Check for non-zero number of arguments for safety reasons.

This commit is contained in:
hjp 2000-09-07 08:44:42 +00:00
parent 173ccac1bc
commit bcd6a7e8bd
1 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,12 @@
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Usage: $0 find-options" >&2
exit 1
fi
@@@find_printf@@@ "$@" -type f -printf '%TY%Tm%Td%TH%TM.%TS %p\n' |
while read timestamp file
do
echo -n "" > "$file"
: > "$file"
touch -t "$timestamp" "$file"
done