Chat & Social > The Bar - General Chat

O/T - Automated text file editing - CALLING TECHIES!

(1/1)

Horness:
I am looking for either some nifty code, or a small app to automate the editing of a text file. (Anyone sh*t hot with batch files?)

The text file format does not need to be changed, however the first line, and last 2 lines need to be removed for it to work correctly with another application. The text file can vary in length, and filename as well.

I know it's only a 5 second job to strip them out and re-save, however the "operator" who will be doing this is about as technical as a bowl of salad, and still stares in awe as the arrow moves on screen when she moves the mouse.

Any help appreciated.

Horness.

xmob:
In *nix, it's an easy one liner:


--- Code: ---cat inputfile.txt | sed '1 d' | sed '$ d' | sed '$ d' > outputfile.txt
--- End code ---

Navigation

[0] Message Index

Go to full version