I would like to remove carriage returns/line feeds in a text file, but in a specific cadence:
Read first line (Header Line 1), remove cr/lf at the end (replace it with a space ideally);
Read the next line (Line of Text 2), leave the cr/lf intact;
Read the next line, remove the cr/lf;
Read the next line (Header Line 2), remove cr/lf at the end (replace it with a space);
Read the next line (Line of
I need to run a cronjob that will monitor a directory for files with a certain extension, when one appears I then need to run the below scripts How do I go about combining the following sed statements into one script?
Hi,
I have a pipe delimited file. There are around 700 columns in the file.
The 65th column has carriage return which is causing read issue with our ETL process.
New to unix. I have a couple files of 5 million records. I have a key field on those records. I have about 300 keys that I need to remove off the file, and I don't want to write a program to do it. I have used grep -v in the past and that works great for a few records, but I can't see myself having to do that 300 times/file.
Is there an easier way using grep, egrep, sed/awk, etc....
Hello, ksh on Sun5.8 here. I have a pipe-delimited, variable length record file with sub-segments identified with a tilda that we receive from a source outside of our control. The records are huge, and Perl seems to be the only shell that can handle the huge lines. I am new to Perl, and am trying to come up with a regex to find segments > 15 and remove them.
I have a CSV with carriage returns in place of newlines.
I have a tab delimited text file. When I open the file with vi editor, I can see ^M character (in blue color).
If you've been typing $^$ into the regular OpenOffice Writer search and replace dialog and coming up empty, try this plugin. It's awesome. It lets you look for a series of empty paragraph returns, or a carriage return at the end of a paragraph plus one empty return, and MUCH much more.
Hi guys,
I need help in making a command to find some data.
I have multiple files in which multiple records are present..