[CLUE-Tech] sed help

David Willson dlwillson at thegeek.nu
Tue Jan 13 17:32:35 MST 2004


I'm going crazy here.

I want to take strings returned by 'find' and replace the folder-name I was
searching in with another folder-name, but sed is ~not~ behaving as I want
it to.
This works at the command-line:
>echo "/home/david/.kde" | sed -e s/"\/home\/david"/"\/backups\/david"/
/backups/david/.kde

Now, how do I make it work in a script?

Ultimately, I want something like this:
find /home/david -type d -exec [! -d `sed -e
s/'/home/david'/'/home/backups/david'/` ] echo "Error: Directory no found!"




More information about the clue-tech mailing list