Are you allowed to use "cut"? Code:
ls -1 /etc/magic /sbin/fsck /boot/grub/menu.lst /usr/share/games/wombat /var/cache/man/index.db /usr/bin/defcon 2>&1 1>existingFiles | cut -d" " -f1 >nonexistingFiles
If not, try
Code:
ls -1 /etc/magic /sbin/fsck /boot/grub/menu.lst /usr/share/games/wombat /var/cache/man/index.db /usr/bin/defcon 2>&1 1>existingFiles 2>nonexistingFiles
The drawback there is that instead of a simple list of files in "nonexistingFiles", you'll have a list like:
Code:
/boot/grub/menu.lst not found
/var/cache/man/index.db not found
|