Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Create a script of the last executed command

barisx answered on March 23, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • bash execute last command by keyword

  • Create a script of the last executed command

    0

    Sometimes commands are long, but useful, so it's helpful to be able to make them permanent without having to retype them. An alternative could use the history command, and a cut/sed line that works on your platform. `history -1 | cut -c 7- > foo.sh` 

    Popularity 1/10 Helpfulness 1/10 Language shell
    Link to this answer
    Share Copy Link
    Contributed on Mar 23 2023
    barisx
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.