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. UNIX for Dummies Questions & Answers
I have an amount of folders and I want to delete only the empty ones. But I have more than 200 empty folders, so I would preffer do not delete one by one... I know it is possible, but I don't know how. I've tried with the size, using 'du' command, and saving the result in a file. After that, I made... (3 Replies)
Discussion started by: saitsug
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
I want to delete all empty directories in a long directore tree structure. I want to use that from a script that will run on HP-UX 11. My definition of empty directory is that there is no regular file under it and directly beneath it. To elaborate, I have below directories.
/app/dev/java... (14 Replies)
Discussion started by: asutoshch
14 Replies
4. Shell Programming and Scripting
I'm trying to write a shell script to files of zero length in a specified directory, but I keep getting errors. Would anybody be kind enough to look it over for issues? Thanks a bunch in advance.
#!/bin/sh
if
then
if
then
find $1 -type f -size 0 -print|xargs rm
exit 0... (1 Reply)
Discussion started by: ScriptingIssues
1 Replies
5. Shell Programming and Scripting
hi,
I'd like to ask you if you can help me with such surely easy thing - I have some data and need to plot them. I have txt of data in two columns, tab separated, but some second columns are empty. like
1```` 2
1.2``
3```` 2
4.44`
5`````
6.1```1
how can I erase all the lines... (2 Replies)
Discussion started by: bsco
2 Replies
6. UNIX for Dummies Questions & Answers
Hi Experts,
I want to print the lines whose third field in non-empty/blank space.
i.e.
INPUT FILE/B]
dcdccghjrry0yd cont
dcdccttrk820529 cont rdekedfsSCr
dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies
7. UNIX for Advanced & Expert Users
abc#
abc#this is a test
abc#this is a test to delete
abc#
xyz#
xyz#this is a test two
xyz#
In the above example '#' is common. How to do delete the emply lines. In specific to observe the output as:
abc#this is a test
abc#this is a test to delete
xyz#this is a test two
.
.
.
. (5 Replies)
Discussion started by: Aejaz
5 Replies
8. Shell Programming and Scripting
Hi,
I have an dir which has 50K file, some of them are empty. I want to delete the empty file from the dir. I am planning to use the following command.
ls -l | grep " 0 " | awk '{print $9}'
I can copy this to an file and then how do I use this file to delete the empty files.... Any help... (2 Replies)
Discussion started by: Script40
2 Replies
9. Shell Programming and Scripting
Hi,
I need to delete the lines with empty name.
What is the best way to do it?
Thanks a lot for your help!
EMID MMDDYY HOURS JOB EMNAME
0241 051605 11.40 52062 someone
0520 051605 10.63 52062
0520 051605 10.66 52062
0520 051605 10.65 52062 (3 Replies)
Discussion started by: whatisthis
3 Replies
10. Shell Programming and Scripting
I know this must be really easy, but i can't get it to work
I've got a perl script, with a file.
I want to print an empty line, and the following doesn't seem to work:
print nameoffile "\n"
thanks for your help!! (3 Replies)
Discussion started by: kfad
3 Replies