[ale] Re: Need help with a sed script
Greg Freemyer
greg.freemyer at gmail.com
Thu May 12 18:30:12 EDT 2005
Nevermind, I got it
sed -e 's@^\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)@\3\4\5\6\1\2@' infile > outfile
What could be easier? ;)
On 5/12/05, Greg Freemyer <greg.freemyer at gmail.com> wrote:
> I don't use sed very often, does anyone know how to shift the first 2
> chars of every line to chars 5 & 6.
>
> In otherwords if I have lines like:
>
> 123456rest of line.
>
> I need it to be:
>
> 345612rest of line.
>
> PS: Any tool can be used, but I have 80,000 lines to modify in a
> single file, and sed is the only tool I know for the job.
>
> Thanks
> Greg
> --
> Greg Freemyer
> The Norcross Group
> Forensics for the 21st Century
>
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
More information about the Ale
mailing list