#bashtricks — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #bashtricks, aggregated by home.social.
-
Ever wanted to use the entirety of stdin as an argument to your Bash command, newlines and special characters and all, and without any Bash expansion/globbing/escaping magic? No? Just me?
Anyway, the magic incantation is `"$(</dev/stdin)"`. If you're gonna be typing at your terminal, remember Ctrl+D will end your message.
I mostly use it for adding annotations to Taskwarrior tasks, but maybe commit messages with `git commit -m "$(</dev/stdin)"` and similar might also be useful.
-
Ever wanted to use the entirety of stdin as an argument to your Bash command, newlines and special characters and all, and without any Bash expansion/globbing/escaping magic? No? Just me?
Anyway, the magic incantation is `"$(</dev/stdin)"`. If you're gonna be typing at your terminal, remember Ctrl+D will end your message.
I mostly use it for adding annotations to Taskwarrior tasks, but maybe commit messages with `git commit -m "$(</dev/stdin)"` and similar might also be useful.
-
Ever wanted to use the entirety of stdin as an argument to your Bash command, newlines and special characters and all, and without any Bash expansion/globbing/escaping magic? No? Just me?
Anyway, the magic incantation is `"$(</dev/stdin)"`. If you're gonna be typing at your terminal, remember Ctrl+D will end your message.
I mostly use it for adding annotations to Taskwarrior tasks, but maybe commit messages with `git commit -m "$(</dev/stdin)"` and similar might also be useful.
-
TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can
export IGNOREEOF=3
and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.
-
TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can
export IGNOREEOF=3
and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.
-
TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can
export IGNOREEOF=3
and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.
-
TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can
export IGNOREEOF=3
and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.
-
TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can
export IGNOREEOF=3
and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.
-
"🐧Finde & löse Datei-Probleme: Nutze 'grep' zum Suchen nach Dateinamen, 'find' für die Suche im Inhalt. Kombiniere beide, um effizient zu arbeiten. Beispiel: grep -rIl 'Suchbegriff' /Verzeichnis | xargs ls -lt | head -n 5. #Linux #OpenSource #BashTricks 💡"
-
redteamers take note, if your c2 can't handle moving whole directories very well.
usually works like a champ in places where they don't look at the network stack much or at all, or employs folks who openly say networking doesnt matter
-
redteamers take note, if your c2 can't handle moving whole directories very well.
usually works like a champ in places where they don't look at the network stack much or at all, or employs folks who openly say networking doesnt matter
-
redteamers take note, if your c2 can't handle moving whole directories very well.
usually works like a champ in places where they don't look at the network stack much or at all, or employs folks who openly say networking doesnt matter
-
redteamers take note, if your c2 can't handle moving whole directories very well.
usually works like a champ in places where they don't look at the network stack much or at all, or employs folks who openly say networking doesnt matter
-
redteamers take note, if your c2 can't handle moving whole directories very well.
usually works like a champ in places where they don't look at the network stack much or at all, or employs folks who openly say networking doesnt matter
-
Still my favorite lesser known Bash feature is glob expansion during editing. Type
echo *.txtAnd then press Ctrl-X followed by star, expression will be expanded and then you can remove items you'd like to exclude (either inside bash or press Ctrl-X followed by Ctrl-E to launch
$EDITOR) #bashTricks -
Still my favorite lesser known Bash feature is glob expansion during editing. Type
echo *.txtAnd then press Ctrl-X followed by star, expression will be expanded and then you can remove items you'd like to exclude (either inside bash or press Ctrl-X followed by Ctrl-E to launch
$EDITOR) #bashTricks -
Still my favorite lesser known Bash feature is glob expansion during editing. Type
echo *.txtAnd then press Ctrl-X followed by star, expression will be expanded and then you can remove items you'd like to exclude (either inside bash or press Ctrl-X followed by Ctrl-E to launch
$EDITOR) #bashTricks -
Still my favorite lesser known Bash feature is glob expansion during editing. Type
echo *.txtAnd then press Ctrl-X followed by star, expression will be expanded and then you can remove items you'd like to exclude (either inside bash or press Ctrl-X followed by Ctrl-E to launch
$EDITOR) #bashTricks -
Still my favorite lesser known Bash feature is glob expansion during editing. Type
echo *.txtAnd then press Ctrl-X followed by star, expression will be expanded and then you can remove items you'd like to exclude (either inside bash or press Ctrl-X followed by Ctrl-E to launch
$EDITOR) #bashTricks