03-11-06 10:51 PM
Mike wrote:
> can anyone see the error in this script please I am BASHing my head LOL
>
>
> while read line
> do # For as many lines as the input file has...
> $tmp=${line:0:1}
> if [$tmp -ne $comma]; # if tmp is not a , then
> then
> $getdate=${line:0:9}
> $theday=`date +%A -d $getdate`
> $theLine=$theday "-" $thecount "," ${line:10:20}
> else
> $theLine=$line
> fi
> echo $theLine >> testoutput.txt
> done < testtides.csv
> exit
>
Assign to var and not to $var.
tmp=${line:0:1}
getdate=${line:0:9}
theday=`date +%A -d $getdate`
theLine=$line
etc.
Janis
[ Post a follow-up to this message ]
|