10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have multiple files in my log folder. e.g:
a_m1.log
b_1.log
c_1.log
d_1.log
b_2.log
c_2.log
d_2.log
e_m1.log
a_m2.log
e_m2.log
I need to keep latest 10 instances of each file.
I can write multiple find commands but looking if it is possible in one line.
m file are monthly... (4 Replies)
Discussion started by: wahi80
4 Replies
2. Shell Programming and Scripting
Hello all,
I have since given up trying to figure this out and used sed instead, but I am trying to understand awk and was wondering how someone might do this in awk.
I am trying to match on the first field of a specific file with the first field on multiple files, and append the second field... (2 Replies)
Discussion started by: karlmalowned
2 Replies
3. Shell Programming and Scripting
Hi,
I need help to find matched patterns in 30 files residing in a folder simultaneously. All these files only contain 1 column. For example,
File1
Gr_1
st-e34ss-11dd
bt-wwd-fewq
pt-wq02-ddpk
pw-xsw17-aqpp
Gr_2
srq-wy09-yyd9
sqq-fdfs-ffs9
Gr_3
etas-qqa-dfw
ddw-ppls-qqw... (10 Replies)
Discussion started by: redse171
10 Replies
4. Shell Programming and Scripting
Hi,
I have many test*.ft1 files to which I want to read as input for a script called
pipe2txt.tcl and print the output in each separate file.
For example,
pipe2txt.tcl < test001.ft1 > test001.txt
How can I read many files in this maner?
thank you very much,
Best,
Pahuja (5 Replies)
Discussion started by: Pahuja
5 Replies
5. Shell Programming and Scripting
Hi,
I am using sub to remove blank spaces and one pattern(=>) from the input string. It works fine when I am using two sub functions for the same. However it is giving error while I am trying to remove both spaces and pattern using one single sub function.
Working:
$ echo " OK => " |awk... (2 Replies)
Discussion started by: sai_2507
2 Replies
6. Shell Programming and Scripting
HI I have a list of files that are incorrectely names and I need to move them to new name .. I tried few things that has not worked so far can you help ?
I need to rename all thes eifle ( tere are over 100 )
xldn0357bap.orig.new
xldn0389bap.orig.new
xldn0439bap.orig.new... (12 Replies)
Discussion started by: mnassiri
12 Replies
7. Shell Programming and Scripting
Hi,
I have to write one script that has to search a list of numbers in certain zipped files.
For eg. one file file1.txt contains the numbers. File1.txt contains 5,00,000 numbers and I have to search each number in zipped files(The number of zipped files are around 1000 each file is 5 MB)
I have... (10 Replies)
Discussion started by: vsachan
10 Replies
8. UNIX for Dummies Questions & Answers
>testfile
while read x
do
if then
echo $x >> testfile
else
fi
if then
echo $x >> testfile
else
fi
done < list_of_files
is there any efficient way to search abc.dml and xyz.dml ? (2 Replies)
Discussion started by: dr46014
2 Replies
9. Shell Programming and Scripting
I have a situation where I need to search for multiple strings (error messages) such as 'aborted' 'file not found' etc in directory having logs. I have put all the error messages in a text file and using the command.
grep -f <textfile> <filetobegrepped>
I'm doing this thru a script where I... (5 Replies)
Discussion started by: bornon2303
5 Replies
10. Shell Programming and Scripting
Hi,
I want to list the files containing a no of pattern
like for single string i can use
grep -l "string" *
This command will enlist the files containg this string. Similarly i would like to use for multiple string.
I like to enlist file names having string1 and string 2
Can... (3 Replies)
Discussion started by: vikash_k
3 Replies