Anders,
Perfect, thanks a lot.
Your method not only fixes my syntax errors, but is even somewhat
readable. (Assuming any sed script is readable.)
Greg
On 5/12/05, Anders Johansson
On Friday 13 May 2005 00:09, Greg Freemyer wrote:
Anders,
I see your online, maybe you can answer this fairly quickly for me.
I don't use sed very often, how do I 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.
Reading a tutorial, I think it is something like: sed -e 's@^\(?\)\(?\)\(?\)\(?\)\(?\)\(?\)@\3\4\5\6\1\2@' file
Well, that looks like it might be made to work. This
sed -e 's/\(..\)\(....\)/\2\1/' file
seems to work when I just tried it.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-- Greg Freemyer The Norcross Group Forensics for the 21st Century