Need a bit more of help over this one. The command is not working for some of the lines. Can you please help if the lines are as below:
Code:
54961242,"780","780-HORIZ-00000","005010X223A2","Y","N","000001403","1178 ",30,"2300 ","HI ",,,,,"REJ ","PNASC.HIPDT.NARJ6NNJ.NEWA.D120309.T232827.0035430-H","8 ","Segment has Data Element Errors
","2012-03-10-00.07.41.438918","NM1*IL*1*FELDER*PAMELA****MI*YHQ3HZN39529840
CLM*HAH53954*4890.13***13:A:1**A*Y*Y
HI*BF:4019:::::::Y*BF:V5869:::::::E"54961243,"780","780-HORIZ-00000","005010X223A2","Y","N","000001403","1185 ",36,"2300 ","HI ",,,,,"REJ ","PNASC.HIPDT.NARJ6NNJ.NEWA.D120309.T232827.0035430-H","8 ","Segment has Data Element Errors
","2012-03-10-00.07.41.499676","NM1*IL*1*MCCLURKIN*STEPHANIE****MI*NJX3HZN14544770
NM1*QC*1*MCCLURKIN*WILLIAM"
I need them as below:
Code:
54961242,"780","780-HORIZ-00000","005010X223A2","Y","N","000001403","1178",30,"2300","HI",,,,,"REJ","PNASC.HIPDT.NARJ6NNJ.NEWA.D120309.T232827.0035430-H","8","Segment has Data Element Errors","2012-03-10-00.07.41.438918", "NM1*IL*1*FELDER*PAMELA****MI*YHQ3HZN39529840CLM*HAH53954*4890.13***13:A:1**A*Y*YHI*BF:4019:::::::Y*BF:V5869:::::::E"54961243,"780","780-HORIZ-00000","005010X223A2","Y","N","000001403","1185",36,"2300","HI",,,,,"REJ","PNASC.HIPDT.NARJ6NNJ.NEWA.D120309.T232827.0035430-H","8 ","Segment has Data Element Errors","2012-03-10-00.07.41.499676","NM1*IL*1*MCCLURKIN*STEPHANIE****MI*NJX3HZN14544770NM1*QC*1*MCCLURKIN*WILLIAM"
The data in bold represents the beginning of each line. Thanks a lot in advance
hi there
i'm trying to delete blank lines and or lines with spaces only from a series of files in an directory.
to do so, i'm using this:
for files in `ls /users/myname/pesop* 2>/dev/null`
do
grep -v ^$ $files > newfile
mv newfile $files
done
now, this works great for blank lines but... (3 Replies)
What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Hi.. I'm facing a trouble in replacing two blank lines in a file using shell script...
I used sed to search a line and insert two blank lines after the searchd line using the following sed command.
sed "/data/{G;G;}/" filename . In the file, after data tag, two lines got inserted blank lines..... (4 Replies)
I have a file like
blah
blah blah blah
this is the text I need,
which might be between 1-4 lines, but
always has a blank line above and below
it, and is at the end of the text file
the code tags don't show the trailing blank line. I started by deleting the last blank line with:
... (2 Replies)
So the tag for this forum says all newbies welcome...
All I want to do is go through my file and find lines which contain a given string of characters then replace these with a blank line. I really tried to find a simple command to do this but failed.
Here's what I did come up with though:
... (2 Replies)
Hi All
Need Help
I have a file with the below format (ABC.TXT) :
®¿¿ABCDHEJJSJJ|XCBJSKK01|M|7348974982790
HDFLJDKJSKJ|KJALKSD02|M|7378439274898
KJHSAJKHHJJ|LJDSAJKK03|F|9898982039999
(cont......)
I need to write a script where it will check for : blank lines (between rows,before... (6 Replies)