spraci.info

Search

Items tagged with: bash

- #ThisWeekInLinux - #Linux 5.0, #UBports, #Librem 5, #Bash 5.0, #Fedora, #Funtoo, #AMD, #SuperTuxKart



On this episode of This Week in Linux, Linus Torvalds announced that the Linux 5.0 Kernel is coming soon. We got some Linux Mobile news from UBports Ubuntu Touch and Purism Librem 5. Then in App News, Bash 5.0 is out and we'll check out some new interesting apps like a new Password Manager and subtitles syncing tool. In distro news, we'll look at some news from Clonezilla Live, Funtoo, and Fedora. Later in the show we'll check out some Security News for Metasploit and a new 2FA phishing tool. Then we'll finish out the show with some Linux Gaming news for Super Tux Kart and A Story About My Uncle. All that and much more!
https://www.invidio.us/watch?v=vt0hJaHm3M8
 
Linux 5.0, UBports, Librem 5, Bash 5.0, Fedora, Funtoo, AMD, SuperTuxKart | This Week in #Linux 50 - https://tuxdigital.com/twinl50

On this episode of This Week in Linux, Linus Torvalds announced that the Linux 5.0 Kernel is coming soon. We got some Linux #Mobile news from #UBports #Ubuntu Touch and #Purism Librem 5. Then in App News, #Bash 5.0 is out and we'll check out some new interesting apps like a new #Password Manager and subtitles syncing tool. In distro news, we'll look at some news from Clonezilla Live, #Funtoo, and #Fedora. Later in the show we'll check out some #Security #News for #Metasploit and a new 2FA #phishing tool. Then we'll finish out the show with some #LinuxGaming news for #SuperTuxKart and A Story About My Uncle. All that and much more!

Episode 50 | This Week in Linux

TuxDigital: Episode 50 | This Week in Linux – TuxDigital (Michael Tunnell)

 

sed


Vielleicht sind da ja ein paar nützliche Sachen dabei.
Nützliche, einzeilige Scripts für SED (Unix Stream Editor)
#sed #script #bash
 
#bash - we all use it. It's a #gnu program. #zemlinPAC and others call it "liiiiiiinox"
 
#bash - we all use it. It's a #gnu program. #zemlinPAC and other call it "liiiiiiinox"
 
#Boxes – Draws #ASCII Art Boxes and Shapes in Linux Terminal
https://www.tecmint.com/boxes-draws-ascii-art-boxes-in-linux-terminal/ #gnu terminal more likely... e.g. #bash
Boxes – Draws ASCII Art Boxes and Shapes in Linux Terminal
 
Bourne-Again Shell: Bash 5.0 bringt neue Funktionen
https://www.heise.de/ix/meldung/Bourne-Again-Shell-Bash-5-0-bringt-neue-Funktionen-4270163.html
#Shell #bash
 
GNU Shell: Bash 5.0 ist verfügbar - Golem.de
https://www.golem.de/news/gnu-shell-bash-5-0-ist-verfuegbar-1901-138583.html
#Bash #POSIX #Server #Applikationen #OpenSource #Softwareentwicklung
 
Image/photo

The simple and quick way to ~~fuck your ISP,~~ enable obfuscation, bridges and local proxy (Fedora 29 + systemd)

Part 1. Obfuscation

In network security, obfuscation refers to methods used to obscure an attack payload from inspection by network protection systems.
If you want to search something as "obfs4proxy"...
# dnf search obfs4proxy
(...)

NOTHING! Because the right name for obfuscator (v.4) is obfs4.x86_64! (or obfs4)

But don't forget: the right name of this pluggable installed transport is obfs4proxy (man obfs4proxy, etc.)

Well... Just install:
# dnf install obfs4.x86_64
Now stop tor.service:
# systemctl stop tor
... And edit tor configuration:
# nano /etc/tor/torrc
You must add two strings:
# Use obfs4proxy to provide the obfs4 protocol.
ClientTransportPlugin
... show more
 
Image/photo

The simple and quick way to ~~fuck your ISP,~~ enable obfuscation, bridges and local proxy (Fedora 29 + systemd)

Part 1. Obfuscation

In network security, obfuscation refers to methods used to obscure an attack payload from inspection by network protection systems.
If you want to search something as "obfs4proxy"...
# dnf search obfs4proxy
(...)

NOTHING! Because the right name for obfuscator (v.4) is obfs4.x86_64! (or obfs4)

But don't forget: the right name of this pluggable installed transport is obfs4proxy (man obfs4proxy, etc.)

Well... Just install:
# dnf install obfs4.x86_64
Now stop tor.service:
# systemctl stop tor
... And edit tor configuration:
# nano /etc/tor/torrc
You must add two strings:
# Use obfs4proxy to provide the obfs4 protocol.
ClientTransportPlugin
... show more
 
Image/photo
Image/photo

The easiest way to install and configurate #dnscrypt-proxy (Fedora 29 + systemd)

  • PREAMBLE
Practically, documentation and manuals of dnscrypt-proxy is terrible. Really terrible and tangled! Thus, forget this:

~~https://github.com/jedisct1/dnscrypt-proxy/wiki/Installation-linux~~
~~https://github.com/jedisct1/dnscrypt-proxy/wiki/Installation-ArchLinux~~
~~... show more
 

Noah: Bash on Ubuntu on macOS


Bash on Ubuntu on macOS. Contribute to linux-noah/noah development by creating an account on GitHub.
Article word count: 43

HN Discussion: https://news.ycombinator.com/item?id=18765184
Posted by prabirshrestha (karma: 59)
Post stats: Points: 141 - Comments: 41 - 2018-12-26T21:40:49Z

\#HackerNews #bash #macos #noah #ubuntu
Article content:

Image/photo

You can’t perform that action at this time.

You signed in with another tab or window. [1]Reload to refresh your session. You signed out in another tab or window. [2]Reload to refresh your session.

Press h to open a hovercard with more details.

References

Visible links
1. file:///dev/
2. file:///dev/

HackerNewsBot debug: Calculated post rank: 107 - Loop: 305 - Rank min: 100 - Author rank: 84
 
I just created a #BASH #script to convert a #Markdown file into PDF, EPUB, and ODT files using pandoc. It automatically adds metadata like title, author name, and date to the epub files.

https://github.com/NylaWoethief/MarkdownToEbookConverter/tree/master

#Programming #FreeSoftware #GPL #GNULinux
 
I've been trying to get into #coding. I still kind of suck at it, but Exercism is pretty awesome. So far I'm 22/91 exercises into the #haskell track. I also successfully completed a #helloworld program in #bash scripting, which I find to be real goddamn confusing at this point. Eventually I'd like to do some #python as well, but for the moment I think I'll just keep chugging along with Haskell.
If anyone wants to chat about it (or anything else really), I use the #xmpp on this account, so feel free to add me. It would be cool to have a #penpal to chat with.
#exercism #programming #penpals
 

Show HN: McFly, a smart Bash history search CLI in Rust with a neural network


Fly through your shell history. Great Scott! Contribute to cantino/mcfly development by creating an account on GitHub.
Article word count: 43

HN Discussion: https://news.ycombinator.com/item?id=18593015
Posted by tectonic (karma: 3532)
Post stats: Points: 110 - Comments: 32 - 2018-12-03T21:08:18Z

\#HackerNews #bash #cli #history #mcfly #network #neural #rust #search #show #smart #with
Article content:

Image/photo

You can’t perform that action at this time.

You signed in with another tab or window. [1]Reload to refresh your session. You signed out in another tab or window. [2]Reload to refresh your session.

Press h to open a hovercard with more details.

References

Visible links
1. file:///dev/
2. file:///dev/

HackerNewsBot debug: Calculated post rank: 84 - Loop: 356 - Rank min: 80 - Author rank: 41
 
diff_avg_supercomposites.sh example output


average of diff and average views of satellite photos of the Earth
This is one of thousands of images like it (each unique though) I’ve recently generated with an experimental process. The experiment is a success if I may say so.

This is the process to (potentially) get some way cool procedural images from satellite (or any!) images, accomplished with a new script at https://github.com/…/ma…/recipes/diff_avg_supercomposites.sh :

Phase I.
– collect several cool satellite images of civilization and/or... show more
 
Hi guys, this is the first time I asked for some technical issue here so let's what is going to happen.

Basically it should be something pretty easy but this is the typical situation where all my limits come out...

I am trying to create my own Retroarch box based on Debian minimal, it will be very essential, without running DE or WM. Said that I was able to log in console automatically, at the point I will launch my front-end based in whiptail that I will control with the gamepad but before I need to understand how to setup the menu.

Basically what I have is this:
#!/bin/sh
whiptail --backtitle "ROCK'N'PLAY" --fb --nocancel --ok-button "run" \
--title "Rock'n'Play Menu" \
--menu "Choose an option and Rock!" 18 60 6 \
1 RetroArch \
2 Restart \
3 Shutdown \
3>&1 1>&2 2>&3

Now I have to launch retroarch with 'startx retroarch', doing restart with '/bin/systemctl restart' or doing shutdown with '/sbin/poweroff' but I can't understand how to apply these commands. I found several examples but... show more
 
GNU Parallel

Text is from https://www.gnu.org/software/parallel :

GNU parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables. A job can also be a command that reads from a pipe. GNU parallel can then split the input and pipe it into commands in parallel.

If you use xargs and tee today you will find GNU parallel very easy to use as GNU parallel is written to have the same options as xargs. If you write loops in shell, you will find GNU parallel may be able to replace most of the loops and make them run faster by running several jobs in parallel.

GNU parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU parallel as input for oth... show more
 
I'm not much of a #programmer, but I just wrote a little line:
cat ~/path/to/directory/[12]* | grep "^something.*end$"
This is to vomit out a whole bunch of files with names like: 1998-10-24 or 2016-12-08. They're dates. And then it grabs lines that start with "something" and end with "end". It worked nicely. I got my little report of data going all the way back to 1989 or so.

I liked it, so I aliased it. And then I thought, "Oh wait, this will stop working on January 1st, 3000 AD."

So, if you're around on January 1st, 3000 and you get screwed by my oversight... sorry.

#bash #funny? #3000-01-01
 
Every time I read one of your articles you always suggest complexity over things that already exist and are quite easy. You can create alias for your most repetitive commands without installing or compiling anything. This may setup differently based on your distros but the behavior is always the same.

For the #debian based distros works like this:

http://www.debianadmin.com/howto-create-your-own-aliases-in-debian.html

You can also pass variables if you tweak a bit your alias like this guide pretty neat:

https://www.cyberciti.biz/faq/linux-unix-pass-argument-to-alias-command/

#bash #linux
 

Creating a bash completion script


A tutorial for creating a bash completion script
Article word count: 2575

HN Discussion: https://news.ycombinator.com/item?id=18060049
Posted by pelsio (karma: 58)
Post stats: Points: 137 - Comments: 34 - 2018-09-24T18:27:18Z

\#HackerNews #bash #completion #creating #script
Article content:

... show more
 

gnulinux a


this are some commands to start working with #commandline or a teminal in #gnulinux alike systems.

$pwd
$ls
$ll
$dir
$man name_of_any_program
$mkdir name_of_desire_directory
$cd ..
$cd \

add #users
$sudo useradd -m -s /bin/bash name_of_new_user
$sudo passwd same_user_name

$sudo useradd -m /bin/sh another_new_user
$sudo gedit /etc/passwd
read the lines in /etc/passwd.
modify another_new_user line, add at the end the word: false
save
this will block another_new_user to use #Shell for example.
---------------------------------------------------------------
$sudo apt-get update
$sudo apt-get install net-tools
$sudo apt-get install htop
$sudo apt-get install sl

#bash stands for bourne again shell.

You may find useful to experiment with commands using kvm or a virtual machine.
 
Command:
git commit --gpg-sign --message "fixed typo"
Error:
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
Solution:
export GPG_TTY=$(tty)
Tags: #git #commit #repository #dev #gpg2 #gnupg #signature #crypto #hack #bash #zsh #security
 

GDPR request @all diaspora podmins except ( diasp.org )


@friendica , hubzilla pod admins, could you please create a similar script ?


Could you please run the following script on your pod if you are using diaspora software? for tioati@diasp.org

#!/bin/bash

# change db login info to match your environment . it is best not to write the password in the script for security reason

db_user="bn_diaspora"
db_server="localhost"
db_pwd=$(grep 'password:' /opt/bitnami/apps/diaspora/htdocs/config/database.yml | tail -1 | cut -d ':' -f 2 | sed -r 's/[ "]//g')
db_name="bitnami_diaspora"
diaspora_handle=$1
guid=$(mysql -N -u "$db_user" -h "$db_server" --password="$db_pwd" "$db_name" -e "select guid from people where diaspora_handle = '${diaspora_handle}'" 2>/dev/null)

echo "### $diaspora_handle with guid = $guid :" >&2

for table in posts comments likes

do
echo " Deleting all $table" >&2
mysql -N -u "$db_user" -h "$db_server" --password
... show more
 
#bash #Python
 
PSDUEPUNTI="[${TBLUE}${FLASH}${BRIGHT}]:[${NORMAL}]"
PSDATE="[${TYELLOW}${BRIGHT}][\D{%Y/%m/%d} \t][${NORMAL}]"
PSUSERHOST="[${TYELLOW}${BRIGHT}][\u@\h][${NORMAL}]"
PSW="[${TGREEN}][\W][${NORMAL}]"
PSw="[${TGREEN}][\w][${NORMAL}]"
PSBATTERY="$([ -f /tmp/BPCAP ] && (cat /tmp/BPCAP; echo -n "%] "))[${NORMAL}]"
PSTTY="[${BRIGHT}]$TTY[${NORMAL}]"
PSPROMPT="[${TCYAN}${BRIGHT}]\$[${NORMAL}]"
PS1="${PSDATE}${PSDUEPUNTI}${PSUSERHOST}${PSDUEPUNTI}${PSTTY}${PSDUEPUNTI}${PSw}\n${PSBATTERY}${PSDUEPUNTI}${PSW}${PSPROMPT} "
export PS1

quite "baroque" but I find very useful date and time into the prompt to know the time between 2 prompts (overall for long time command line...)
(and battery information when on laptop)

#bash, #prompt, #linux,
 
Another #linux thread was asking for simple #Bash examples, but here I want to see what everyone does with their prompts. I love my prompt, it's turns green on success and red on errors. It has the directory structure above so the entire width of the window is available for commands.
  1.  PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$ "

Then I add "root" after sudo su or logging in to root directly.
  1.  PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\nroot# "
 

(Call for) Simple #Bash #functions


So, is anyone interested in showing some of their useful Gnu/Linux profile functions?

# here's one to quickly find the process id of an application.

# fid

Edit your ~/.bashrc file and include these lines at the end.

findid is the actual function, while fid is a shorter alias to it.

  1.  findid()
  2.  {
  3.   ps aux | grep -i "$1"
  4.  }
  5.  
  6.  alias fid=findid


Usage: ~$findid firefox or: ~$fid firefox
#gnu #linux
 

Simple #Bash #functions


So, is anyone interested in showing some of their useful Gnu/Linux profile functions?

here's one to quickly find the process id of an application.

fid


Edit your ~/.bashrc file and include these lines at the end.

findid is the actual function, while fid is a shorter alias to it.

  1.  findid()
  2.  {
  3.   ps aux | grep -i "$1"
  4.  }
  5.  
  6.  alias fid=findid


Usage: ~$findid firefox or: ~$fid firefox
#gnu #linux
 
#TIL: One can set a #Bash variable to the content of a file with var="$(< /path/to/some/file)". No need to use cat.
#til #bash
 

Bash Infinity: Standard library and boilerplate framework for Bash


bash-oo-framework - Bash Infinity is a modern boilerplate / framework / standard library for bash
Article word count: 43

HN Discussion: https://news.ycombinator.com/item?id=17730492
Posted by jpatokal (karma: 12887)
Post stats: Points: 141 - Comments: 23 - 2018-08-10T03:30:07Z

\#HackerNews #and #bash #boilerplate #for #framework #infinity #library #standard
Article content:

Image/photo

You can’t perform that action at this time.

You signed in with another tab or window. [1]Reload to refresh your session. You signed out in another tab or window. [2]Reload to refresh your session.

Press h to open a hovercard with more details.

References

Visible links
1. file:///dev/
2. file:///dev/

HackerNewsBot debug: Calculated post rank: 101 - Loop: 73 - Rank min: 80 - Author rank: 61
 

Detecting the use of "curl | bash" server-side


Published on 19-04-2016 by philInstalling software by piping from curl to bash is obviously a bad idea and a knowledgable user will most likely check the content first. So wouldn't it be great if a…
Article word count: 37

HN Discussion: https://news.ycombinator.com/item?id=17636032
Posted by rubyn00bie (karma: 1886)
Post stats: Points: 126 - Comments: 59 - 2018-07-29T01:44:54Z

\#HackerNews #bash #curl #detecting #serv... show more
 

Incomplete Path Expansion (Completion) For #Bash #Linux

 

Something about functions in Bash (2017)


Here's something you didn't know about bash functions. Usually when you write a function you do this: function name () { ... } Right? I know you do, because that's how everyone writes functions. Well,…
Article word count: 341

HN Discussion: https://news.ycombinator.com/item?id=17465798
Posted by okket (karma: 25124)
Post stats: Points: 101 - Comments: 60 - 2018-07-05T18:53:26Z

\#HackerNews #2017 #about #bash #functions #something
Article content:... show more
 
How To Show How Many Lines In A File In Linux #linux #commandline #bash
How To Show How Many Lines In A File In Linux
 
Giving #Konsole some love https://www.angrycane.com.br/en/2018/06/17/giving-konsole-some-love/ #kde #qt #bash #gnu #linux #qt5
Giving Konsole some love

Angry Cane Ramblings: Giving Konsole some love

 
In the news: "New CIA director says she'll send more spies to the field"
Did she regard herself to be a "spy" when she murdered suspects in the process of #torture and then 'disappeared' the tapes she had taken? #cia #haspel #trump #gop #bash
 
Trannies Gay-Bash Lesbian

I would have paid good money to see this spectacular event.

#LGBT #Transgender #Gay #Bash #Twitter #Bar #Spectacular
 
Trannies Gay-Bash Lesbian

I would have paid good money to see this spectacular event.

#LGBT #Transgender #Gay #Bash

https://gendertrender.wordpress.com/2018/06/01/non-binary-queers-gay-bash-lesbian-outside-st-louis-gay-bar-brag-about-it-on-twitter/amp/?__twitter_impress
 
newer older