Re: script regular expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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 field separator (IFS), which is
usually set to space, tab and newline. Each of these characters is
considered a field separator i.e. a break point in your list. You can
read up on this at
http://www.tldp.org/LDP/abs/html/internalvariables.html#IFSH .

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux