108 reputation
3
bio website github.com/GP89
location United Kingdom
age
visits member for 2 years
seen Nov 14 at 9:49

Jan
17
awarded  Scholar
Jan
17
accepted How do I append successful commands to a file using bash shell?
Dec
18
comment How do I append successful commands to a file using bash shell?
+1 this is awesome, although everything is getting appended, even the unsuccessful commands? That's fine I only plan to use the output in the successful file to make the script, so I wont be using !! for that.
Dec
18
comment How do I append successful commands to a file using bash shell?
yea I didn't try to run strace with sudo, while its running it prevents me from using sudo in the second shell
Dec
18
comment How do I append successful commands to a file using bash shell?
This echos the literal string !! into the file, rather than <command> or the command on the previous line like "!!" did.
Dec
17
awarded  Student
Dec
17
comment How do I append successful commands to a file using bash shell?
If I do this and try to use sudo in the other shell I get "sudo: must be setuid root". I'm starting to think this probably wasn't one of my best ideas.. lol
Dec
17
comment How do I append successful commands to a file using bash shell?
@Zoredache Um, I guess but wont this include unsuccessful commands too? and how will I know where the history I want to repeat begins?
Dec
17
asked How do I append successful commands to a file using bash shell?
Nov
13
awarded  Supporter