Quote:
Originally Posted by
Raghav Garg
Thanks, I will try and see if it works.. my company is using a pretty old version so I have a limited number of possibilities
These days, even a wireless router probably has awk. If you're running anything with Linux or UNIX in its name you should have it.
grep prints '<stdin>' because you didn't give it a file name, it was reading from
tr instead, through a pipe, also called 'standard input'. So that's not quite what you want.
grep usually has limits on how long a line it will process, and tr -d '\n' turns it into one giant line, so that's not a good solution anyway.
There are ways with grep, involving calling grep multiple times, and possibly sorting and merging its output. I think the awk way is the closest to what you asked for.