Andrew Woods · @awoodsnet
270 followers · 1251 posts · Server phpc.social

Are there particular challenges you have - or maybe a function you wish you had - when shell scripting using dates/times ?


#bash #shellscript #commandline

Last updated 1 year ago

jqコマンドのストリーミング処理 (--stream) をパイプでawkにつなぐ方法のまとめ
qiita.com/ko1nksm/items/d977aa

#qiita #shellscript #bash #awk #unix

Last updated 1 year ago

Nils · @Nils
189 followers · 1083 posts · Server mastodon.xyz
scrufflepuff · @scrufflepuff
39 followers · 760 posts · Server social.vivaldi.net

and .... so, it works great, but has a weird thing where if you suspend or hibernate your desktop session, you get disconnected and have to delete the UUID for vpn-ipv6leak-protection before it will let you reconnect.
Thinking of making a to do this for me, but for now I just run <nmcli connection show>, copy the UUID, then <nmcli connection delete> with the UUID, and then reconnect.
Anyways; it's a fine morning, here.

#protonvpn #linux #shellscript

Last updated 1 year ago

Andrew Woods · @awoodsnet
260 followers · 1098 posts · Server phpc.social

For your shell scripts — what are you using for testing them?

#bash #cli #shellscript #testing

Last updated 1 year ago

Karl Voit :emacs: :orgmode: · @publicvoit
2149 followers · 16269 posts · Server graz.social

If "#!/usr/bin/env foo" is the preferred (for portable scripts) in order to find "foo" independent of its path, why isn't the recommended shebang "#!env foo" which would not assume a path for "env" either? 🤔

#shebang #shellscript #linux #unix

Last updated 1 year ago

irgendlink · @irgendlink
393 followers · 1252 posts · Server fimidi.com

Das Poster für meine Radreise rund um die Schweiz wird dieses Mal eventuell eine reine Schwarzweiß-Collage. Hab gestern etwa 200 Bilder der Reise mit diversen App-Kombinationen als Schwarzweißfotos geappt.
Im nächsten Schritt werden die Bilder mit in Form gebracht und mit einem zur Collage gefügt.

#umsland #appspressionism #appspressionismus #snapseed #collage #gimp #shellscript

Last updated 1 year ago

Andrew Woods · @awoodsnet
261 followers · 1024 posts · Server phpc.social

what do you wish was easier about Bash scripting?

#bash #shellscript #cli

Last updated 1 year ago

Hal Canary · @hal_canary
34 followers · 332 posts · Server mastodon.sdf.org

,print_path () {
echo 'PATH=\n'
echo "$PATH" | tr : \\n | sed 's/^/ /'
echo
}

#shell #shellscript #commandline

Last updated 1 year ago

OSTechNix · @ostechnix
645 followers · 1698 posts · Server floss.social
illiliti · @illiliti
5 followers · 13 posts · Server fosstodon.org

If you use diff to compare files in your , don't. Instead use cmp utility .

#shellscript

Last updated 1 year ago

oemb1905 · @oemb1905
261 followers · 1044 posts · Server gnulinux.social

I know everyone is very hot for Wireguard lol, but I still love openvpn and it works just fine. Made a simple bash script to cut my client keys and zip them up and then drop the scp command to get them to my offsite before I zap public ssh on the remote server. It was simple, but fun to make. repo.haacksnetworking.org/oemb - Hope everyone is well!

#freesoftware #gnulinux #bash #shellscript

Last updated 1 year ago

Daiana · @daiana
167 followers · 2380 posts · Server artisan.chat

Here is one of the best scripting examples I have seen in a while.
I still don't believe someone actually wrote this.

id=$old_id
if [ $id -ne $old_id ]
then
PrintMsg "ERROR - id not equal to old id "
exit_func 0
fi

On top of that - ALL errors exited with status 0 in this script.


#headdesk #smartcoding #scripting #script #unix #linux #shell #shellscript #unbelievable #stillprocessing

Last updated 1 year ago

JdeBP · @JdeBP
37 followers · 278 posts · Server tty0.social

@RL_Dane

The traditional better method than sort|uniq is of course

awk '!x[$0]++'

which everyone doing text processing should learn.

So starting from that you can easily arrive at

awk '{x[$0]++;} END {for(k in x) {print x[k],k;}}'

whose output you just need to sort.

#sort #awk #shellscript

Last updated 1 year ago

Franklin Souza · @fraank
1 followers · 11 posts · Server social.linux.pizza

+1 script criado, dessa vez com o transmission-cli (cliente torrent).
archlinux

#archlinuxbr #linux #shellscript #brasil #brazil #bash #brazilian #linuxbr

Last updated 1 year ago

If you're looking for a way to safely use any application with the network, without the overhead of , then I suggest you try TorVirt.

It's a simple that sets up a and a Tor daemon in a .

This way, all network traffic is routed through Tor, without the need for a second gateway VM.

Enhanced with performances!

forge.chapril.org/hardcoresush

I'd love to hear your feedback 🤗

#tor #whonix #shellscript #libvirt #virtual #network #lightweight #rootless #podman #container #vm #security #kvm

Last updated 1 year ago

Franklin Souza · @fraank
0 followers · 5 posts · Server social.linux.pizza
Franklin Souza · @fraank
0 followers · 4 posts · Server social.linux.pizza