Search Results

Search: Posts Made By: ffdstanley
1,362
Posted By yazu
Yes. Your file is in DOS format and you have to...
Yes. Your file is in DOS format and you have to convert it to unix. See: How do I convert between Unix and Windows text files? - Knowledge Base (http://kb.iu.edu/data/acux.html)
1,362
Posted By alister
You have a carriage return, \r, at the end of...
You have a carriage return, \r, at the end of every line except the last one.

Regards,
Alister
1,805
Posted By durden_tyler
$ $ $ cat input 777777,111,08-20-2011 ...
$
$
$ cat input
777777,111,08-20-2011
111111,222,08-20-2011
222222,222,08-11-2011
777777,111,07-24-2011
777777,222,07-24-2011
111111,222,07-22-2011
222222,111,07-29-2011
$
$
$ perl -F,...
1,805
Posted By yazu
Not for sale: cat INPUTFILE | sed 's/ *$//' |...
Not for sale:
cat INPUTFILE | sed 's/ *$//' | awk -F, '{ print $0, $3, $2, $1 }' |
sort | uniq -f2 | sed -rn 'G; /(.{6})\n\1/p; s/\n.*//; h' | cut -d' ' -f1
777777,222,07-24-2011...
1,805
Posted By birei
Hi, A solution using Perl: $ cat infile...
Hi,

A solution using Perl:

$ cat infile
777777,111,08-20-2011
111111,222,08-20-2011
777777,111,07-24-2011
777777,222,07-24-2011
111111,222,07-22-2011
$ cat script.pl
use warnings;...
3,519
Posted By danmero
Ops, first answer was wrong ;) awk...
Ops, first answer was wrong ;)
awk 'BEGIN{FS=OFS=","}{x=split($2,a," ");for(i=0;++i<=x;){$2=a[i];print}}' file
3,519
Posted By bartus11
Try: awk -F"," -vOFS="," '$2~" "{n=split ($2,a,"...
Try: awk -F"," -vOFS="," '$2~" "{n=split ($2,a," ");for (i=1;i<=n;i++){$2=a[i];print};next}1' Temp.csv
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy