10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
2. Shell Programming and Scripting
I'm trying to delete the blank lines from the file $Sfile. tried the below set of commands. Both are giving the same error (: bad interpreter: No such file or directory)
awk 'NF > 0' $Sfile > $Tfile
cat $Tfile
sed -i '/^$/d' $Sfile
cat $Sfile
Not sure if there's any other problem with... (17 Replies)
Discussion started by: Pandee
17 Replies
3. Shell Programming and Scripting
Hi Guys,
I have a quetion which was already discussed in the forum, but for some reason all approches suggested fail for me.
I have a file which have blank lines at the body of the text as well as at the end. I need to delete ONLY blank lines at the end. Unfortunatly the approach below does not... (5 Replies)
Discussion started by: aoussenko
5 Replies
4. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
5. Solaris
How can we delete all the blank spaces in the beginning of some lines in a text in vi?
Thanks, (2 Replies)
Discussion started by: Pouchie1
2 Replies
6. Shell Programming and Scripting
Hi Guys,
I have a file in which each set of records are separated by two blank line. I want to replace it with a single blank line.
Can you guys help me out?
Regards,
Magesh (9 Replies)
Discussion started by: mac4rfree
9 Replies
7. Shell Programming and Scripting
Hi
I nned cmd to which will help me to replace a line in file with blank line
e.g.
file1
a
b
c
d
e
after running cmd I shud get
file1
b
c
d
e (5 Replies)
Discussion started by: tarunn.dubeyy
5 Replies
8. Shell Programming and Scripting
I have a number of files (arranged in directories) which have last line blank,
I am trying to synchronize my code with other env and due to this blank lines, all files error out as different although only difference is that of balnk line at end of file.
Is there a way I can recursively... (2 Replies)
Discussion started by: ruchimca
2 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 am trying to do two things in my script. I will really appreciate any help in this regards.
Is there a way to delete a last line from a pipe delimited flat file if the last line is blank. If the line is not blank then do nothing.....
Is there a way to count a word that are starting... (4 Replies)
Discussion started by: rkumar28
4 Replies