Author: Rob via Hampshire Date: To: 'Hampshire LUG Discussion List' CC: malpass9875 Subject: Re: [Hampshire] One for sed experts
That’s done the trick – thanks.
From: Hampshire <hampshire-bounces@???> On Behalf Of Marc Loftus via Hampshire
Sent: 04 July 2020 11:17
To: Hampshire LUG Discussion List <hampshire@???>
Cc: Marc Loftus <marc@???>
Subject: Re: [Hampshire] One for sed experts
The problem is not the spaces, the problem is the "\" which becomes an escape character, so sed is looking for c:usersfreditunes mediamusic
I created a test file with references in it as per your C dir example (Called it test2)
After running an updated command to allow the back slashes to be seen:
sed -i 's^c:\\users\\fred\\itunes\\itunes media\\music\\^x:\\anotherfolder\\^g' test2
I dunno whether it’s because my first string has spaces or the character ‘s’ but I can’t make it work. As ever (in my experience) I don’t know whether I’m one keystroke away or should be using awk or something similar like awk.
Company Registered Number 08977559 | Registered in England
P Please consider the environment - do you really need to print this email?
This message is intended for the addressee only. It may contain information of a confidential or legally privileged nature. If you have received this message in error, please notify the sender and delete the message immediately. WebMarcIT Ltd. cannot accept liability for any loss or damage you may incur as a result of virus infection.