The easiest way is to pipe it through awk
You can omit the filename by supplying the file as STDIN, e.g.
but you'll still get leading whitespace. So the awk solution is easiest.
EDIT: Looking at this, it'd be less expensive to just do the whole thing with awk...
Cheers
ZB
As i was reading an article on being a "HACKERS" which was 30 minutes ago thinking that HACKING was the same as CRACKING, after the reading i discovered their difference, a hacker builds the internet while crackers just cracks and annoy like phreaking and breaking into people's computer.
That... (5 Replies)
Alright, so I'm interested in using Unix, but I have a couple of pretty basic questions:
1) What's the relationship between Linux and Unix? Are they one and the same, or completely different?
2) Can you use Unix on a laptop?
and
3) Where can you get Unix?
Thanks for listening. (9 Replies)
Hello,
I am just getting starting with awk and wondering if anyone could help with the following problem.
I have a large file of data, 50,000 rows x 6 columns. I would like to search in blocks of 500 rows for a maximum value in a specific column and compile an output file that prints the... (0 Replies)
Hi ,
I am interested in getting some new projects on shell scripting . Can some one suggest me some bidding site where I can get the projects.
Regards (0 Replies)
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Hello, this is probably a simple request but I've been toying with it for a while.
I have a large list of devices and commands that were run with a script, now I have lines such as:
a-router-hostname-C#show ver
I want to print everything up to (and excluding) the # and everything after it... (3 Replies)
I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place.
What I need
The following command is placed at the prompt:
TICLI... (4 Replies)