It is always my favorite.
the following example shows how to change variable in unix shell to lower case and remove file extension
for f in *.shp
do
#change to lower case
file_name=`echo $f | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
#remove file extension to use as table name
table_name=${file_name%\.*}
echo "table name: $table_name"
done<
No comments:
Post a Comment