Re: [CentOS] script regular expression

2012-02-10 Thread Marc Deop
On Thursday 09 February 2012 23:38:51 sheraz naz wrote: #/bin/bash for i in $(cat certificates.txt) do echo $i done Bad practice. Try: while read i;do echo $i;done certificates.txt -- That's the right solution, but don't forget to always quote your variables $i

Re: [CentOS] script regular expression

2012-02-10 Thread Steve Brooks
On Thu, 9 Feb 2012, 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

Re: [CentOS] script regular expression

2012-02-10 Thread Leonard den Ottolander
Hello Alejandro, On Thu, 2012-02-09 at 23:29 -0800, Alejandro Rodriguez Luna wrote: #/bin/bash for i in $(cat certificates.txt) do echo $i done (As people already pointed out in case the input is coming from a file you should use a redirect.) What you see has to do with the internal

Re: [CentOS] script regular expression

2012-02-10 Thread m . roth
Steve Brooks wrote: On Thu, 9 Feb 2012, 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

Re: [CentOS] script regular expression

2012-02-10 Thread Alejandro Rodriguez Luna
-- De: m.r...@5-cent.us m.r...@5-cent.us Para: CentOS mailing list centos@centos.org Enviado: Viernes, 10 de febrero, 2012 9:59:35 Asunto: Re: [CentOS] script regular expression Steve Brooks wrote: On Thu, 9 Feb 2012, Alejandro Rodriguez Luna wrote: Hi everyone, I

[CentOS] script regular expression

2012-02-09 Thread Alejandro Rodriguez Luna
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

Re: [CentOS] script regular expression

2012-02-09 Thread sheraz naz
--- On Fri, 2/10/12, Alejandro Rodriguez Luna el_alexl...@yahoo.com.mx wrote: From: Alejandro Rodriguez Luna el_alexl...@yahoo.com.mx Subject: [CentOS] script regular expression To: CentOS mailing list centos@centos.org Date: Friday, February 10, 2012, 1:29 AM Hi everyone, I was creating