[X-Unix] Converting Path Type

Victor Eijkhout eijkhout at cs.utk.edu
Thu May 26 18:42:42 PDT 2005


On May 26, 2005, at 9:32 PM, Dave Higgins wrote:

> Can someone point me to a command line command that would convert a 
> quoted file path to an escaped path? Meaning:
>
> Convert...
>
> "/Volumes/Main HD/Dave's Stuff/file.txt"
>
> to
>
> /Volumes/Main\ HD/Dave\'s\ Stuff/file.txt

[~] %% echo "$ATTACHMENTS"
/Users/victor/Documents/Eudora Folder/Attachments Folder
[~] %% echo "$ATTACHMENTS" | sed 's/ /\\ /'
/Users/victor/Documents/Eudora\ Folder/Attachments Folder

Learn and cherish thy unix tools.

My favourites are sed, awk, make.

V.
-- 
Victor Eijkhout
329 Claxton complex, 865 974 9308
http://cs.utk.edu/~eijkhout/



More information about the X-Unix mailing list