Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help shorten command 1

Status
Not open for further replies.

Kipnep70

Technical User
Nov 18, 2003
81
US
I have a one line stream of data that needs to be dissected. (Pretend the following is all on one line)

Code:
i45543,1,3,0,application3,audit_arch_1yr,/.secure/etc/audit.server1.200705071730.gz,
/.secure/etc/audit.server1.200705071750.gz,
/.secure/etc/audit.server1.200705071810.gz,,1178593694,0

The command I'm running is:

Code:
bpdbjobs -report -all_columns -jobid 45543 | sed 's/,/&\^J/g' | grep ^/ | cut -f1 -d,


Desired output is:

Code:
/.secure/etc/audit.server1.200705072050.gz
/.secure/etc/audit.server1.200705072110.gz
/.secure/etc/audit.server1.200705072130.gz

Is there a way I can shorten the above command?
 
Code:
bpdbjobs -report -all_columns -jobid 45543 | awk 'BEGIN{RS=","}/^\//'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top