18 lines
304 B
Bash
18 lines
304 B
Bash
#!/bin/bash
|
|
suf=$1
|
|
if [ $# -gt 0 ]
|
|
then
|
|
for f in *.$suf; do
|
|
bn=`basename "$f" .$suf | tr [:blank:] _`
|
|
new=$bn.$suf
|
|
echo "neuer Dateiname:"
|
|
echo $new
|
|
mv "$f" $new
|
|
done
|
|
else
|
|
echo "Kein Suffix gegeben!!"
|
|
echo "Verwendung: strip-space.sh SUFFIX"
|
|
echo "Beende ...."
|
|
exit 1
|
|
fi
|