On Fri, Nov 27, 2009 at 6:32 PM, PigInACage <davide.papa...@gmail.com> wrote:
> Hello all.
>
> I've got a file CSV with 3 column
> name,surname,group
>
> if one of the column has got a space like
> Davide,Super Dooper,Group
> I cannot use it in a for loop
>
> for i in `cat list.csv` ; do echo $i ; done
> the result is
> Davide,Super
> Dooper,Group
>
> how can I have all inone line?
> Really thanks.
>

Hello,

Perl is different from bash shell, perl uses "\n" for a new line, so
just open the file and print each line.

# cat test.csv
Davide,Super Dooper,Group
Shine,Hello world,Group

# for i in `cat test.csv`;do echo $i;done
Davide,Super
Dooper,Group
Shine,Hello
world,Group

# perl -ne 'print' test.csv
Davide,Super Dooper,Group
Shine,Hello world,Group

// lan

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to