Can somebody clean my command line up a little bit.
The text I want to maniuplate comes from an output of a command:
I'm trying to get it all on one line. I want to keep the ";" as the field delimiter.
like this:
I also don't want any extra spaces between fields.
Here is what I'm running:
If somebody can help me figure out how to shorten this, I'd appreciate it.
The text I want to maniuplate comes from an output of a command:
Code:
Master;HP-UX-IA64, HP-UX11.23;6.5.3;NetBackup;6.5;650000;/usr/openv/netbackup/bin;HP-UX B.11.23 ;
6.5.3.1
I'm trying to get it all on one line. I want to keep the ";" as the field delimiter.
like this:
Code:
Master;HP-UX-IA64, HP-UX11.23;6.5.3;NetBackup;6.5;650000;/usr/openv/netbackup/bin;HP-UX B.11.23;6.5.3.1
I also don't want any extra spaces between fields.
Here is what I'm running:
Code:
./someCommand | sed '/^$/d' | awk -F";" 'BEGIN{ORS=";"}1' | awk -F";" '{print $2 ";" $10}'
If somebody can help me figure out how to shorten this, I'd appreciate it.