del

Page principale

Répondre à ce message
Auteur: Jochen Dreyer
Date:  
À: guilde
Sujet: del
Salut Fred!

Voici mon petit script. L'alias dans .tcshrc a effectivement resolu le
probleme.

A plus

Jochen
#!/bin/tcsh
# script "del"
# Moves files to the directory ~/deleted rather than removing them directly.
# The directory ~/deleted must exist.
if ( $#argv == 0 ) then
     echo "there are no files to be deleted"
     echo "usage: del file_1 file_2 ..."
     exit 1
endif
foreach del_file ($argv[*])
mv -i $del_file ~/deleted
echo "$del_file" moved to ~/deleted
end