Comments on: Kosher Coding https://pthree.org/2006/07/27/kosher-coding/ Linux. GNU. Freedom. Mon, 18 Feb 2019 07:35:14 +0000 hourly 1 https://wordpress.org/?v=5.1-alpha-43678 By: Aaron https://pthree.org/2006/07/27/kosher-coding/#comment-1261 Mon, 31 Jul 2006 13:59:49 +0000 http://www.pthree.org/2006/07/27/kosher-coding/#comment-1261 Haha! Good point. Didn't think of that. However, luckily, other scripts require the 'sample.fin' filename, so in this case, I am good.

]]>
By: HarleyPig https://pthree.org/2006/07/27/kosher-coding/#comment-1258 Mon, 31 Jul 2006 06:01:42 +0000 http://www.pthree.org/2006/07/27/kosher-coding/#comment-1258 This still seems clumsy to me. What if the filename needs to be changed?

#!/bin/bash

file=$1

if [ ! -e $file ]
then
echo $file does not exist
exit
fi

lower=`echo $file | awk '{ print tolower( $1 ) }'`

if [ $file != $lower ]
then
echo Moving $file to $lower
mv $file $lower
fi

echo Done.

]]>