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
|
#!/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' |
|
@@@find_printf@@@ "$@" -type f -printf '%TY%Tm%Td%TH%TM.%TS %p\n' |
|
||||||
while read timestamp file
|
while read timestamp file
|
||||||
do
|
do
|
||||||
echo -n "" > "$file"
|
: > "$file"
|
||||||
touch -t "$timestamp" "$file"
|
touch -t "$timestamp" "$file"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue