17 lines
295 B
Bash
17 lines
295 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 ...."
|
|
fi
|