Re: can anyone see the error in this script please I am BASHing my
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Shell > Re: can anyone see the error in this script please I am BASHing my




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: can anyone see the error in this script please I am BASHing my  
Janis Papanagnou


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:12 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register