10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to remove everything coming after empty line under ubuntu14.04.
How may I do it?
file:
aaa
020390
bb00id3
c03wisi
209dl
x092sia
0290s
I expect:
aaa
020390
bb00id3
c03wisi (3 Replies)
Discussion started by: baris35
3 Replies
2. Shell Programming and Scripting
Hi,
I tried the following options but was unable to delete blank lines from file
Input file = temp.hash.txt
temp.hash.txt content
90
0
89.56
0
0
57575.4544
56.89 (9 Replies)
Discussion started by: uuuunnnn
9 Replies
3. Shell Programming and Scripting
Hi all,
I have file1 with line blank e.g.
$cat file1
aaa 111 222 333 444
bbb 555 666 777 888
ccc
ddd 1010 1010 1010
eee
then i need delete the lines blank (3 and 5) so show
$cat file1
aaa 111 222 333 444
bbb 555 666 777 888
ddd 1010 1010 1010 (5 Replies)
Discussion started by: aav1307
5 Replies
4. Shell Programming and Scripting
Hi All,
I am creating a text file using perl. The first record I am writing as "$line" and all the other as "\n$line". At the end the file is having N number of lines. I am using this file for MLOAD (Teradata), which is reading N+1 lines in the file and failing.I am not able to find new line... (2 Replies)
Discussion started by: unankix
2 Replies
5. Shell Programming and Scripting
All,
I have a file which contains two entry with spaces (either one or more than one space). ex.
/tmp/scripts/sql CUST_YR_END_INI.sql
/tmp/scripts/sql CUST_WK_END_INI.sql
/tmp/scripts/sql CUST_MTH_END_INI.sql
/tmp/scripts/sql CUST_YR_END_INC.sql
now I want to... (11 Replies)
Discussion started by: anshu ranjan
11 Replies
6. Shell Programming and Scripting
I am having a text file sample.txt
The contents of the sample.txt is as follows.
____________
aaa,bbb
ccc,ddd
____________
first line contains aaa,bbb
second line is blank
third line contains ccc,ddd
Now I need to write a script to search in the file sample.txt. If it contains... (4 Replies)
Discussion started by: kmanivan82
4 Replies
7. Shell Programming and Scripting
I can't seem to get sed to allow me to insert text in the first line of an empty file. I have a file.txt that is a 0 byte file. I want sed to insert " fooBar" onto the first line. I've tried a few options and nothing seems to work. They work just fine if there's text in the file tho. Help? (4 Replies)
Discussion started by: DC Slick
4 Replies
8. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
9. Shell Programming and Scripting
I have a file which has the first blank line:
sundev22$cat /t1/bin/startallocs
/t1/bin/startallocsys 123
sundev22$
Is there a command to remove this first blank line? Thanks for help -A (4 Replies)
Discussion started by: aoussenko
4 Replies
10. Shell Programming and Scripting
Hi, I have a flat text file which contains blank line between each text line. Is there any command to get rid of it?
Thanks for your help (11 Replies)
Discussion started by: xfang
11 Replies