Frobozz has asked for the wisdom of the Perl Monks concerning the following question:
My current hosts file format:
etc etc1.1.1.1 01computer12 01computer12.abc.com 1.1.1.2 34computer21 34computer21.abc.com
and so on. Do I read the second column into a variable, edit that variable, then append it to the end of the line? I'm just unsure how to proceed. I'm not asking for anyone to write it for me, I could just use some ideas/direction, or any kind of help you can offer. Thanks!!!!1.1.1.1 01computer12 01computer12.abc.com 01host12 1.1.1.2 34computer21 34computer21.abc.com 34host21
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to re-arrange and edit lines in a text file
by tybalt89 (Monsignor) on Nov 07, 2016 at 23:16 UTC | |
Re: How to re-arrange and edit lines in a text file
by BillKSmith (Monsignor) on Nov 08, 2016 at 03:30 UTC | |
Re: How to re-arrange and edit lines in a text file
by Anonymous Monk on Nov 07, 2016 at 22:12 UTC | |
Re: How to re-arrange and edit lines in a text file
by Monk::Thomas (Friar) on Nov 08, 2016 at 15:46 UTC |