10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello folks,
I am deleting a directory with script it is taking 11Hour and also increase the IO on server. I am using below command, inside date directory there are hour directories, which i am deleting after archiving. Archiving is not taking long time, only "rm -rf" is taking alot of time with... (21 Replies)
Discussion started by: learnbash
21 Replies
2. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
3. UNIX for Dummies Questions & Answers
Ok I have a file that contains
#num.txt
1 2 3
4 5 6
7 8 9
my script main.sh checks to see if the first two arguments exist in a seperate file and the third argument would be the value in the num.txt
so when i execute
$ main.sh name place 5
how would i go about deleteing the... (13 Replies)
Discussion started by: austing5
13 Replies
4. Shell Programming and Scripting
Hi experts,
I have a file, where inside this file contains multiple columns (up to 2000 columns):
0.05 0.54 2.02 0.21 1.39 2.92 0.31 1.75 3.34
I want to delete column 3,6,9,12,15,18,21... etc (any columns where can be divided from value 3),
so that results is like:
0.05 0.54 0.21 1.39... (6 Replies)
Discussion started by: guns
6 Replies
5. Shell Programming and Scripting
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
6. Shell Programming and Scripting
inputfile has 3 columns
SCHEMA.TAB1 COL1 LENGTH
SCHEMA.TAB2 COL2 LENGTH.
If i use awk on the above inputfile
awk '{print $1}' inputfile.The out put will be
SCHEMA.TAB1
SCHEMA.TAB2.
But from the above output i need to delete SCHEMA. i.e i don't want the string "SCHEMA." should... (6 Replies)
Discussion started by: rocking77
6 Replies
7. Shell Programming and Scripting
Hi
I have a multi -line file which is sorted by the 1-st colomn in the following format:
400 0000 0001 1000 1010 0111 0000 1000 0000
402 1101 0000 1100 1010 0111 1000 1000 0000
403 1001 0000 1100 1010 0111 0000 1000 0000
495 1000 0000 1100 1010 0111 0000 1000 0000
500 0000 0001 1000 0010... (2 Replies)
Discussion started by: aoussenko
2 Replies
8. Shell Programming and Scripting
Hello!
How do I remove the last two letters "GB" off each line, using awk?
What I need to remove is the "GB" in following input:
.....
30GB
2504GB
3GB
40GB
......
The OS used is Solaris9
Regards,
Fredrik (1 Reply)
Discussion started by: sap4ever
1 Replies
9. UNIX for Dummies Questions & Answers
The code below works for finding files created in 2005 that are compressed.
How do I delete these files?
Do I substitute rm -f for the print $0 ?
here's the code that finds the 2005 compressed files
(ls -lR | awk '$8 == "2005" && $9 ~ /Z$/ {print $0}')
thanks for your help!!! (2 Replies)
Discussion started by: igidttam
2 Replies
10. Shell Programming and Scripting
Hi all,
I'm newbi in scripting.
could someone tell how to delete the ^M at the end of the linie with an awk command.
many thanks in advance. (2 Replies)
Discussion started by: liliput
2 Replies