bash script regular expression

Aaron Konstam akonstam at sbcglobal.net
Fri Feb 10 17:07:01 UTC 2012


On Thu, 2012-02-09 at 23:31 -0800, Alejandro Rodriguez Luna wrote: 
> Hi everyone, I was creating a script and i found something i can't
> figure out.
> 
> #/bin/bash
> for i in $(cat certificates.txt)
> do  
>     echo $i 
> done
> 
> I expected this
> 
> RSA Secure Server Certification Authority
> VeriSign Class 1 CA Individual Subscriber-Persona Not Validated
> 
> 
> but i got this
> 
> RSA
> Secure
> Server
> Certification
> Authority
> VeriSign
> Class
> 1
> CA
> Individual
> Subscriber-Persona
> Not
> Validated
> 
>  any ideas how to fix this? i mean, how can i get the whole line
> instead of word by word?
I think you need to use echo -n for all but the last echo. 
> 


-- 
=======================================================================
Death is God's way of telling you not to be such a wise guy.
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam at sbcglobal.net



More information about the users mailing list