Mar
29
awarded Scholar
Mar
29
accepted Optimizing bcache
Mar
25
awarded Popular Question
Feb
3
comment Save Bash script output to text file with conditions
Found the solution -p gives formatting in plain text.
Feb
3
comment Save Bash script output to text file with conditions
Unfortunately there is a formatting issue with this when opening as a text file. when I 'cat 12.txt' exactly like the above example in the my question but when I open it on a text editor, it looks like this gist.githubusercontent.com/pavs/83ea142c8cfecd882f9c/raw/… I think it might be due to how the formatting is handled in the original script: github.com/IntellexApps/blcheck/blob/master/blcheck#L458 Anything I can do to fix the output when opening the file in php?
Feb
3
comment Save Bash script output to text file with conditions
Thanks does almost exactly what I wanted. only I had to add double pipe before rm -r. like this: ./auto.sh > 12_temp.txt grep -q 'Blacklisted:[ \t]*0$' 12_temp.txt || cat 12_temp.txt >> 12.txt || rm -f 12_temp.txt. Other wise i was getting 'cat: invalid option -- 'f' Try 'cat --help' for more information.' error and 12.txt file was empty.
Feb
3
accepted Save Bash script output to text file with conditions
Feb
3
asked Save Bash script output to text file with conditions
Oct
24
awarded Popular Question
Oct
4
accepted Where can you intentionally download computer virus online for testing purpose?
Sep
30
asked SSD cache bcache fails randomly
Sep
26
awarded Popular Question
Sep
16
awarded Teacher
Aug
26
awarded Famous Question
Jul
14
awarded Notable Question
Feb
12
awarded Notable Question
Sep
26
comment Recovering disk with corrupted superblock
I tried that before it didn't work.
Sep
26
asked Recovering disk with corrupted superblock
Sep
17
revised Optimizing bcache
deleted 23 characters in body
Sep
17
awarded Editor
1 2 3 4 5