Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Adding a TAB after a certain ammount of characters

by kennethk (Abbot)
on Apr 16, 2013 at 20:33 UTC ( [id://1029007]=note: print w/replies, xml ) Need Help??


in reply to Adding a TAB after a certain ammount of characters

xkcd://208: Regular Expressions to the rescue.
perl -pi -e 's/^(.{17})(.{6})(.{31})(.{3})(.{3})/$1\t$2\t$3\t$4\t$5\t/ +' file.txt

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1029007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2024-04-19 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found