<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
On 02/10/2012 11:50 AM, Mikkel L. Ellertson wrote:<br>
<span style="white-space: pre;">></span><br>
<blockquote type="cite">On 02/10/2012 11:07 AM, Aaron Konstam wrote:<br>
> On Thu, 2012-02-09 at 23:31 -0800, Alejandro Rodriguez Luna
wrote:<br>
>> Hi everyone, I was creating a script and i found
something i can't<br>
>> figure out.<br>
>><br>
>> #/bin/bash<br>
>> for i in $(cat certificates.txt)<br>
>> do<br>
>> echo $i<br>
>> done<br>
>><br>
>> I expected this<br>
>><br>
>> RSA Secure Server Certification Authority<br>
>> VeriSign Class 1 CA Individual Subscriber-Persona Not
Validated<br>
>><br>
>><br>
>> but i got this<br>
>><br>
>> RSA<br>
>> Secure<br>
>> Server<br>
>> Certification<br>
>> Authority<br>
>> VeriSign<br>
>> Class<br>
>> 1<br>
>> CA<br>
>> Individual<br>
>> Subscriber-Persona<br>
>> Not<br>
>> Validated<br>
>><br>
>> any ideas how to fix this? i mean, how can i get the
whole line<br>
>> instead of word by word?<br>
<br>
Try adding:<br>
<br>
IFS=<br>
<br>
before the do command and see if that does it for you.<br>
<br>
Mikkel<br>
</blockquote>
<br>
<span style="white-space: pre;">></span><br>
<br>
Can't do it directly in front of the do statement, but if you put it
in front of the whole if statement, then the parsing works. *Now* I
have to research what that is doing! Thanks for making me learn
something today! :-)<br>
<br>
Kevin<br>
</body>
</html>