420 reputation
312
bio website
location
age
visits member for 2 years, 4 months
seen Apr 21 at 15:04

Aug
15
revised How do I convert a bash array variable to a string delimited with newlines?
added 35 characters in body
Aug
15
answered How do I convert a bash array variable to a string delimited with newlines?
Aug
2
revised How to pass variables to a HEREDOC in bash?
added 13 characters in body
Aug
2
answered How to pass variables to a HEREDOC in bash?
Jul
25
revised Linux WGET -O command for non existing folders?
error in command
Jul
25
answered Need to transfer files(No SCP) from Linux to IBM-AIX
Jul
25
revised Return last command executed in shell-script
added 162 characters in body
Jul
25
comment Return last command executed in shell-script
-i isn't enabled by default. set -o history can turn on history in script only with specified -i together. But thank you for that way. There is citate from man: When bash is started non-interactively, to run a shell script, for example =)
Jul
25
revised Return last command executed in shell-script
added 83 characters in body
Jul
25
comment Return last command executed in shell-script
wow. in bash v3 (and v4 too) you can just remove the she-bang at all and history will work pretty well.
Jul
25
comment Return last command executed in shell-script
I've added simple exapmle to my answer. It should work at your side. Please try it. May be the trouble is in commands after history?
Jul
25
revised Return last command executed in shell-script
edited body
Jul
25
comment Return last command executed in shell-script
!! equal to the last command. However OP construction equals to the command just before the last one. !-2 exactly equals to OP construction. Unfortunately both !! and !-2 don't work inside of shell script.
Jul
25
awarded  Editor
Jul
25
revised Return last command executed in shell-script
added 152 characters in body
Jul
25
answered Return last command executed in shell-script
Jul
25
answered How can I suspend a whole command sequence in a shell?
Jul
20
awarded  Constituent
Jul
20
awarded  Caucus
Jul
7
comment how to get access to environment variables from output file
Does your file have the exact format as in example? Try to remove ^ before <Value.