9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Input eg:
Ouput Expected.
The #rd line had the unexpted new line, which need to be replaced with space.
I was planing to go with checking the length of each line using awk and if the length is less than the defeined limit, (12 in above case) will replace the newline with space.
... (5 Replies)
Discussion started by: deepakwins
5 Replies
2. Shell Programming and Scripting
Hi all..
I have a text file which looks like below:
abcd
efgh
ijkl
(blank space)
I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file.
I have tried options like... (14 Replies)
Discussion started by: Sathya83aa
14 Replies
3. Shell Programming and Scripting
Greetings!
Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell?
Input is like
abcd1234
xyzd1234
abcd
a1b2c3d4
abcd1234
xyzd1234
xx
abcd1234
Expected output -
abcd1234xyzd1234
abcda1b2c3d4abcd1234xyzd1234
xxabcd1234
... (3 Replies)
Discussion started by: mailme0205
3 Replies
4. UNIX for Dummies Questions & Answers
Greetings!
Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell?
Input is like
abcd1234
xyzd1234
abcd
a1b2c3d4
abcd1234
xyzd1234
xx
abcd1234
Expected output -
abcd1234xyzd1234
abcda1b2c3d4abcd1234xyzd1234
xxabcd1234
... (2 Replies)
Discussion started by: mailme0205
2 Replies
5. Shell Programming and Scripting
Regard,
How can i cut the text by special char(|) around 100 byte
and write the other of the text at newline using Perl.
... (3 Replies)
Discussion started by: Shawn, Lee
3 Replies
6. Shell Programming and Scripting
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
Discussion started by: Shan_u2005
5 Replies
7. Shell Programming and Scripting
Heeloo all,
A weird problem perhaps. May god save others from this problem.
I want to print each line from a variable.. the example below should make it clear.
smvar="Hello World1
Hello world 2
forgot there I guess"
for eachline in $smvar
echo $eachline
end
Whats for... (3 Replies)
Discussion started by: pavanlimo
3 Replies
8. Shell Programming and Scripting
Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies
9. Shell Programming and Scripting
how to remove all tabs and newline (\n) from the exicting file (2 Replies)
Discussion started by: pvr_satya
2 Replies