I've been through many man pages and google searches but still i can't get this straight. I tried perl, tr, bare regex - you name it!
This command is the best working yet:
- Code: Select all
cat pathlist | tr '\n' '" "' > pathlist2
but it just adds one single double quote:
- Code: Select all
/home/e633/Desktop/uni
/home/e633/Desktop/network
/home/e633/Desktop/SSH config notes
/home/e633/Desktop/apache config notes
becomes:
- Code: Select all
/home/e633/Desktop/uni"/home/e633/Desktop/network"/home/e633/Desktop/SSH config notes"/home/e633/Desktop/apache config notes"
instead i want it to be:
- Code: Select all
"/home/e633/Desktop/uni" "/home/e633/Desktop/network" "/home/e633/Desktop/SSH config notes" "/home/e633/Desktop/apache config notes"
So i can use this string for creating a 7zip archive. BTW that newline-separated string is from $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS, as i'm writing a nice user-friendly ubuntu script.

)