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 Desktop Questions & Answers
Guys, can you tell me how to delete directory and sub directory with files in them, for example:
/system/upgrade/title/sub/var/vito/
I would like to delete 'title' and everything under it. Every sub dir contains files which need to be deleted as well.
Thanks (1 Reply)
Discussion started by: DallasT
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a file.txt which seems like having three lines.
wc -l file.txt
3 file.txt
In fact, once it is open in text editor, this file has four lines where the last line is empty. how can i delete this last empty line of the file.txt? I tried the codes below so far but they... (6 Replies)
Discussion started by: senayasma
6 Replies
4. UNIX for Dummies Questions & Answers
I am very new to unix as well as shell scripting.
I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file
Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies
5. Shell Programming and Scripting
How to delete all leading empty lines in a file?
$>cat input.txt
test
Test
$>
output file should be
test
Test
$> (14 Replies)
Discussion started by: johnveslin
14 Replies
6. Shell Programming and Scripting
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies
7. Shell Programming and Scripting
Hi,
I have this piece of shell script:
#!/bin/ksh
x=data1
x=data1
x=data1
for i in 1 2 3
do
cp x $IN_DIR
done
PerformNextTask
$IN_DIR is already designed to automatically pick up x and send x to other directory $OK_DIR. $IN_DIR will be empty once all x goes to $OK_DIR.... (2 Replies)
Discussion started by: luna_soleil
2 Replies
8. Shell Programming and Scripting
i have dir called stock1. it has some 2000 files
How to remove/empty the dir in one shot?
i tried this command,but its not working
rmdir stock1/* stock1/.* (4 Replies)
Discussion started by: ali560045
4 Replies
9. UNIX for Dummies Questions & Answers
I have to remove character " in file which occurs at every line and have to delete empty spaces. Please help (2 Replies)
Discussion started by: vikram2008
2 Replies
10. UNIX for Dummies Questions & Answers
All,
I am having a directory as
drwxrwsr-x 3 intermec intermec 10240 Jan 8 09:07 intermec
inside the directory . the files are like
cd
-rw-r----- 1 intrmc01 intermec 5226 Dec 2 15:03 AST07356.txt
-rw-r----- 1 intrmc01 intermec 5025 Dec 2 12:51... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies