linux - How can I redirect my grep to a txt file, located in another directory? -
grep -n '[0-9]' test.txt > output.txt
i redirect above grep results on new file (not yet created, output2.txt
), needs located in directory directory of test.txt
. example, maybe @ nothome/labs/output2.txt
. how can this?
you can put absolute path output, this:
grep -n '[0-9]' test.txt > /path/to/output/output.txt
Comments
Post a Comment