- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- awk? script wanted to strip data from record
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:28 AM
тАО10-26-2006 07:28 AM
I'm thinking this is something awk could handle in a couple of lines, but I don't have time to mess with it.
Any help would be appreciated...
RFIN0011,PFEE,DEP,TD,145376,282410,30774698,USD,22792601,AX,,"Conveyed Dep. Fee",S,2,0.0200,35.00,0,-0.04
HACT0010,144509,10/25/2006,10/25/2006,10/26/2006,04:43:57
RACT0010,10/25/2006,184218,"sonyon","61025.0006b",2,TD,145376,USD,"147dad12c",,4444444444444444,08/07,5.00,MC,D,10/23/2006,681559,100,,,,5945
RACT0010,10/25/2006,184218,"sonyon","61025.0006b",3,TD,145376,USD,"147dad132",,4444444444444444,09/10,25.00,AX,D,10/23/2006,180392,100,,,,5945
RACT0010,10/25/2006,184218,"sonyon","61025.0006b",4,TD,145376,USD,"12a0e5698",,4444444444444444,08/07,-10.00,MC,R,,,,,,,5945
RACT0010,10/25/2006,184218,"sonyon","61025.097Eb",2,TD,145376,USD,"165a8362c",,4444444444444444,09/10,10.00,AX,D,10/24/2006,164110,100,,,,5945
RACT0010,10/25/2006,184218,"sonyon","61025.097Eb",3,TD,145376,USD,"165a83624",,4444444444444444,08/08,25.00,VI,D,10/24/2006,03693A,100,,,,5945
*DFREND,PID=945479,FREQ=DAILY,CO=144509
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:42 AM
тАО10-26-2006 07:42 AM
Re: awk? script wanted to strip data from record
# awk -F"," '{if ($1~/^RACT0010/) {$12=""};print}' file > file.out
Regards!
...JRF...
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:49 AM
тАО10-26-2006 07:49 AM
Re: awk? script wanted to strip data from record
Thanks for the quick response. Your solution is close, but it stripped out the commas from the record, which I need for the final output.
Result:
RFIN0011,PFEE,DEP,TD,145376,282410,30774698,USD,22792601,AX,,"Conveyed Dep. Fee",S,2,0.0200,35.00,0,-0.04
HACT0010,144509,10/25/2006,10/25/2006,10/26/2006,04:43:57
RACT0010 10/25/2006 184218 "sonyon" "61025.0006b" 2 TD 145376 USD "147dad12c" 08/07 5.00 MC D 10/23/2006 681559 100 5945
RACT0010 10/25/2006 184218 "sonyon" "61025.0006b" 3 TD 145376 USD "147dad132" 09/10 25.00 AX D 10/23/2006 180392 100 5945
RACT0010 10/25/2006 184218 "sonyon" "61025.0006b" 4 TD 145376 USD "12a0e5698" 08/07 -10.00 MC R 5945
RACT0010 10/25/2006 184218 "sonyon" "61025.097Eb" 2 TD 145376 USD "165a8362c" 09/10 10.00 AX D 10/24/2006 164110 100 5945
RACT0010 10/25/2006 184218 "sonyon" "61025.097Eb" 3 TD 145376 USD "165a83624" 08/08 25.00 VI D 10/24/2006 03693A 100 5945
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:52 AM
тАО10-26-2006 07:52 AM
Re: awk? script wanted to strip data from record
awk -F"," '{if ($1~/^RACT0010/) $12=""; print $1","$2","$3","$4","$5","$6","$7","$8","$9","$10","$11","$12","$13","$14","$15","$16","$17","$18","$19","$20","$21","$22","$23}' < file_in > file_out
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2006 07:57 AM
тАО10-26-2006 07:57 AM