[Top][All Lists]

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

Re: problems importing csv files

From: Benjamin Oppermann
Subject: Re: problems importing csv files
Date: Sun, 02 Nov 2014 22:04:22 +0100

Hi Friedrich,
The output of the grep command comes up empty.
Either something is not working the way it should, or (more likely) I just keep getting your instructions wrong. I have no experience working with programming tools like Vi and regular expressions, so it's easy for me to get it all wrong :-(
Would you happen to be on #pspp in IRC?
Am So, 2. Nov 2014, um 20:49, schrieb Friedrich Beckmann:
Hi Ben, 
in your case I would try to look at the file with vi or less. So I would do
> cd <whatever-path-it-is>
> perl -p -e 's/\r\n/,/' ver47-interessantes.csv > a.csv
Now look at the file with 
> vi a.csv
In order to quit vi type ESC :q! 
The grep command expects the case data to start with „Teilnehmer“ at the beginning of the line. You can
> grep Teilnehmer a.csv 
to see if this is the case. grep prints out lines containing that text pattern. 
Am 02.11.2014 um 20:28 schrieb Benjamin Oppermann <address@hidden>:
Hi Friedrich,
It's not working.
I used this exact command: perl -p -e 's/\r\n/,/' /media/Acer/Users/Benjamin/ownCloud/A-UNI/BA-Arbeit.SoSe2014/Daten/ver47-interessantes.csv  > /home/ben/a.csv
If I open the resulting file a.csv in Calc, it has only one line.
Then instead I tried
cd /media/Acer/Users/Benjamin/ownCloud/A-UNI/BA-Arbeit.SoSe2014/Daten/ 
perl -p -e 's/\r\n/,/' ver47-interessantes.csv > a.csv
The second step
grep '^Teilnehmer' a.csv > b.csv
produces an empty file though.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]