home.social

#shelltricks — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #shelltricks, aggregated by home.social.

  1. Some really neat tricks here in this Shell Tricks blog post by 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!

    blog.hofstede.it/shell-tricks-

    #shell #ShellTricks #shellscripting

  2. Some really neat tricks here in this Shell Tricks blog post by 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!

    blog.hofstede.it/shell-tricks-

    #shell #ShellTricks #shellscripting

  3. Some really neat tricks here in this Shell Tricks blog post by 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!

    blog.hofstede.it/shell-tricks-

  4. Some really neat tricks here in this Shell Tricks blog post by 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!

    blog.hofstede.it/shell-tricks-

    #shell #ShellTricks #shellscripting

  5. Some really neat tricks here in this Shell Tricks blog post by 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!

    blog.hofstede.it/shell-tricks-

    #shell #ShellTricks #shellscripting

  6. 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

    #BashTricks #ShellTricks #ssh #postgresql

  7. 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

    #BashTricks #ShellTricks #ssh #postgresql

  8. 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

    #BashTricks #ShellTricks #ssh #postgresql

  9. 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

    #BashTricks #ShellTricks #ssh #postgresql

  10. 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

    #BashTricks #ShellTricks #ssh #postgresql

  11. 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

  12. 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

  13. 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`.

  14. 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

  15. 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

  16. 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

    stackoverflow.com/questions/13

    ----
    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

    #ShellTricks #bash #FLOX

  17. 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

    stackoverflow.com/questions/13

    ----
    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

    #ShellTricks #bash #FLOX