Check for non-zero number of arguments for safety reasons.
This commit is contained in:
parent
173ccac1bc
commit
bcd6a7e8bd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue