Say I have a script that puts out something like this
/path/to/file1 /path/to/file2 /path/to/file3
/path/to/file4 /path/to/file5 /path/to/file6
/path/to/file91 /path/to/file23
/path/to/file130 /path/to/file34 /path/to/file/69 /path/to/file42
How can I take each line, and say, for example, run rm on everything but the first file?
Be sure to leave
$restunquoted so it is subject to word splitting.