10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
My requirement is to remove the carriage return in from the lines which i am reading if the length is lesser than 1330 and append the next line with it. Below is the realistic example of file structure.
Input file:
Blah blah blah blah Blah blah blah blah
Blah blah blah blah Blah... (16 Replies)
Discussion started by: mad man
16 Replies
2. Shell Programming and Scripting
Hi everyone,
I have the following contents in a text file (as seen when viewed using vim):
one two three ^M
four five six ^M
seven
eight
nine ^M
ten eleven twelve ^M
(That is just a small portion of the file)
How can I obtain the following result?
one two three ^M
four five six ^M
seven... (2 Replies)
Discussion started by: gacanepa
2 Replies
3. Shell Programming and Scripting
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... (14 Replies)
Discussion started by: tomr2012
14 Replies
4. Shell Programming and Scripting
I'd like to create an alias that displays my string but leaves my cursor at the end.
Not seeing any examples of this.
One indirect way might be to preload or stuff the history buffer, so I just hit up arrow. (2 Replies)
Discussion started by: tns1
2 Replies
5. Shell Programming and Scripting
Hi,
I would like to insert the line carriage retrun characters on each line. (2 Replies)
Discussion started by: koti_rama
2 Replies
6. Shell Programming and Scripting
Hi All,
I am reading two files and writing out the file name and count of lines in each file to an output file.
My script looks like this:
echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out
echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Discussion started by: Hangman2
2 Replies
7. Programming
I keep running into the same problem with the following script. Every time it prints the carrage (line feed) char when I test. I believe that the issue is in the group by but I do not see it. The code is as follows.
SET FEED OFF
SET ECHO OFF
SET HEADING OFF
SET LINESIZE 1000
SET PAGESIZE... (1 Reply)
Discussion started by: sherrod6970
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a situation where I need to remove the carriage return between the lines.
For.eg.
The input file:
1,ad,"adc
sdfd",edf
2,asd,"def
fde",asd
The output file should be
1,ad,adc sdfd,edf
2,asd,def fde,asd
Thanks
Shash (5 Replies)
Discussion started by: shash
5 Replies
9. Shell Programming and Scripting
I am doing some edi where translations had to be run on unix. Generally when I run the translations on windows, the output file has both carriage returns and line feed where as when ran on unix will have only line feed. I need to insert carriage return before the line feed. Is there some tool... (2 Replies)
Discussion started by: huey ing
2 Replies
10. Shell Programming and Scripting
Hello,
I have a file that has got carriage returns in it and I want to take them out. Anyone know how I can do this in a ksh?
thanks (4 Replies)
Discussion started by: pitstop
4 Replies