#shelltricks — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #shelltricks, aggregated by home.social.
-
Some really neat tricks here in this Shell Tricks blog post by https://burningboard.net/@Larvitz -- thanks Larvitz!
I knew of most of them, but am glad to have now learned of:
1. "fc" to edit the previous command in your editor of choice
2. "**" (globstar) for recursive searching instead of needing to use find (or ls -R)
3. That "esc-." is repeatable to go back further than just the previous command's last arg. I use that all the time, but never thought to hit it more than once!https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
-
Some really neat tricks here in this Shell Tricks blog post by https://burningboard.net/@Larvitz -- thanks Larvitz!
I knew of most of them, but am glad to have now learned of:
1. "fc" to edit the previous command in your editor of choice
2. "**" (globstar) for recursive searching instead of needing to use find (or ls -R)
3. That "esc-." is repeatable to go back further than just the previous command's last arg. I use that all the time, but never thought to hit it more than once!https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
-
Some really neat tricks here in this Shell Tricks blog post by https://burningboard.net/@Larvitz -- thanks Larvitz!
I knew of most of them, but am glad to have now learned of:
1. "fc" to edit the previous command in your editor of choice
2. "**" (globstar) for recursive searching instead of needing to use find (or ls -R)
3. That "esc-." is repeatable to go back further than just the previous command's last arg. I use that all the time, but never thought to hit it more than once!https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
-
Some really neat tricks here in this Shell Tricks blog post by https://burningboard.net/@Larvitz -- thanks Larvitz!
I knew of most of them, but am glad to have now learned of:
1. "fc" to edit the previous command in your editor of choice
2. "**" (globstar) for recursive searching instead of needing to use find (or ls -R)
3. That "esc-." is repeatable to go back further than just the previous command's last arg. I use that all the time, but never thought to hit it more than once!https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
-
Some really neat tricks here in this Shell Tricks blog post by https://burningboard.net/@Larvitz -- thanks Larvitz!
I knew of most of them, but am glad to have now learned of:
1. "fc" to edit the previous command in your editor of choice
2. "**" (globstar) for recursive searching instead of needing to use find (or ls -R)
3. That "esc-." is repeatable to go back further than just the previous command's last arg. I use that all the time, but never thought to hit it more than once!https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
-
Shell Tricks That Make Life Easier (and Save Your Sanity)
https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
#HackerNews #ShellTricks #LifeHacks #Productivity #TechTips #SanitySaver
-
Shell Tricks That Make Life Easier (and Save Your Sanity)
https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
#HackerNews #ShellTricks #LifeHacks #Productivity #TechTips #SanitySaver
-
Shell Tricks That Make Life Easier (and Save Your Sanity)
https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
#HackerNews #ShellTricks #LifeHacks #Productivity #TechTips #SanitySaver
-
Shell Tricks That Make Life Easier (and Save Your Sanity)
https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
#HackerNews #ShellTricks #LifeHacks #Productivity #TechTips #SanitySaver
-
Shell Tricks That Make Life Easier (and Save Your Sanity)
https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
#HackerNews #ShellTricks #LifeHacks #Productivity #TechTips #SanitySaver
-
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
-
Want to read in a password from stdin during a demo without exposing it? This is what I used in my latest talk: `stty -echo && read PASSWORD && stty echo`. #ShellTricks
-
Want to read in a password from stdin during a demo without exposing it? This is what I used in my latest talk: `stty -echo && read PASSWORD && stty echo`. #ShellTricks
-
Want to read in a password from stdin during a demo without exposing it? This is what I used in my latest talk: `stty -echo && read PASSWORD && stty echo`. #ShellTricks
-
Want to read in a password from stdin during a demo without exposing it? This is what I used in my latest talk: `stty -echo && read PASSWORD && stty echo`. #ShellTricks
-
Want to read in a password from stdin during a demo without exposing it? This is what I used in my latest talk: `stty -echo && read PASSWORD && stty echo`. #ShellTricks
-
Capture STDOUT, STDERR and return status in shell variables
This second answer ( the one with the banana function ) shows how to capture all three to variables in bash without needing tmp files
https://stackoverflow.com/questions/13806626/capture-both-stdout-and-stderr-in-bash
----
banana() {
echo "banana to stdout"
echo >&2 "banana to stderr"
return 42
}
--------
. <({ berr=$({ bout=$(banana); bret=$?; } 2>&1; declare -p bout bret >&2); declare -p berr; } 2>&1)
----Then check values of $bout, $berr, $bret
-
Capture STDOUT, STDERR and return status in shell variables
This second answer ( the one with the banana function ) shows how to capture all three to variables in bash without needing tmp files
https://stackoverflow.com/questions/13806626/capture-both-stdout-and-stderr-in-bash
----
banana() {
echo "banana to stdout"
echo >&2 "banana to stderr"
return 42
}
--------
. <({ berr=$({ bout=$(banana); bret=$?; } 2>&1; declare -p bout bret >&2); declare -p berr; } 2>&1)
----Then check values of $bout, $berr, $bret