I need to grep a line from a text file, and delete the fourth and fifth field. then save it back to the text file. If that wont work I could also grep the line, and delete the first number and everything after it on that line. Both would accomplish my goal. Forgive me, I am a little newbish, but can anyone help?
Mattpd
0
Light Poster
Recommended Answers
Jump to PostPost an example of the data file you're working with and the give indications what changes you want to make
Jump to PostThis script below gives me the proper result, but I had to cheat to do it. I just substituted "OUT:06/12/2007:MATT" for "IN" and appended it to the file.txt and then deleted the entire old line. Only problem is that the line is now at the end of the file and …
All 7 Replies
Hilliard
0
Newbie Poster
whizkidash
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
whizkidash
0
Newbie Poster
Mattpd
0
Light Poster
Aia
1,977
Nearly a Posting Maven
hichnam
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.