10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
2. Programming
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
3. Shell Programming and Scripting
Hi,
I have two set of files in a directory called /tmp/backup. I want to write a script to remove the oldest of these two, so that there is space available for a newer similar backup file.
For example,
I have
/tmp/backup/dbbackup_dbname_121223112 (oldest)... (4 Replies)
Discussion started by: welldone
4 Replies
4. Shell Programming and Scripting
How can i remove a file using shell script when its size exceeds 10MB. Given that file is located in different location to the shell script where it is running? (4 Replies)
Discussion started by: vel4ever
4 Replies
5. Shell Programming and Scripting
How can I remove all data that contain domain e.g zzgh@something.com, sdd@something.com.my and gg@something.my in one file? so that i only have data without the domain in the file.
Here is the file structure "test.out"
more test.out
1 zzztop@b.com
1 zzzulll
1 zzzullll@s.com.my
... (4 Replies)
Discussion started by: Mr_47
4 Replies
6. Shell Programming and Scripting
Hi,
I am pasring a file line by line. I need to check each field in line and remove particular line.
input file lines are,
02;ABC;PQR
03;aaa;rrr
04;ABC;ggg
09;eee;ABC
04;lmn;stu
I am looking for line containing "ABC" as field value. Now How can I remove this line from input file... (7 Replies)
Discussion started by: Poonamol
7 Replies
7. Shell Programming and Scripting
Hello Folks,
I want to get the results from a SQL query which needs to be exported to a .txt file.
My Script is something like
#!/bin/ksh
db2 connect to DATABASE user user_name using pwd;
touch test.txt
isResult=0;
isResult= `db2 -x select 'ABC',COL_B from TABLE_A WHERE COL_B=CONDITION`... (6 Replies)
Discussion started by: dinesh1985
6 Replies
8. Shell Programming and Scripting
This regex is supposed to accept files with extensions 270, 276, and "txt" only. Everything else should be discarded.
This is what I have. I'll spare you the rest of the code.
ext =".\$"
#ext =".\$"
#ext =".\$"
#ext =".\$"
for xfile in `ls $dir | grep "$ext" | xargs`; do... (9 Replies)
Discussion started by: grep01
9 Replies
9. Shell Programming and Scripting
Hi, all: I have a question about "cleaning up" a huge file with regular expression(s) and sed:
The init file goes like this:
block1,blah-blah-blah-blah,numseries1,numseries2,numseries3,numseries4
block2,blah-blah-blah-blah-blah,numseries,numseries2,numseries3,numseries4
...... (3 Replies)
Discussion started by: yomaya
3 Replies
10. Shell Programming and Scripting
Hi,
I am writing a shell script that needs to remove duplicate lines within a file by category.
example:
section a
a
c
b
a
section b
a
b
a
c
I need to remove the duplicates within th category with out removing the duplicates from the 2 different sections (one of the a's in section... (1 Reply)
Discussion started by: RichElks
1 Replies