Patrick Wade wrote,
>My problem ; i have a file containing a list of filenames, which may 
>contain spaces or dots in them:
>---
>foo
>bar baz
>quux.random
>---
>I would like to execute a series of scp commands on them:
>---
>scp [EMAIL PROTECTED]:foo here/
>scp "[EMAIL PROTECTED]:bar baz" here/
>scp [EMAIL PROTECTED]:quux.random here/
>---
>My various efforts at IFS definition have not done what i wanted.
>Can anyone point me towards the right way to do this?

Forget IFS--xargs can do you work for you, and in just one command line:

     xargs -i scp '[EMAIL PROTECTED]:{}' here/ <list-of-files

(where "list-of-files" is your file containing the list of filenames).

               - Neil Parker
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to