10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have tried the following code and with that i couldnt achieve what i want.
#!/usr/bin/bash
find ./ -type f \( -iname "*.xml" \) | sort -n > fileList
sed -i '/\.\/fileList/d' fileList
NAMEOFTHISFILE=$(echo $0|sed -e 's/\/()$*.^|/\\&/g')
sed -i "/$NAMEOFTHISFILE/d"... (2 Replies)
Discussion started by: gold2k8
2 Replies
2. UNIX for Dummies Questions & Answers
I am trying to fetch the latest modified file from a directory using the command
find . -type f -exec ls -lt \{\} \+ | head | awk '{print $9}'
After the O/P, I get the below mentioned error and the command doesnt terminate at all.
find: ls terminated by signal 13
find: ls terminated by... (2 Replies)
Discussion started by: Sree10
2 Replies
3. Shell Programming and Scripting
hi,
i have some file in a directory say
p1.txt.201305051200.lst
p1.txt.201305051300.lst
p1.txt.201306051200.lst
p1.txt.201306051300.lst
p2.txt.201306051200.lst
p2.txt.201306051300.lst
i am using p* pattern to retrieve these file
ls -1 p*
the files in red color are the latest... (7 Replies)
Discussion started by: Little
7 Replies
4. Shell Programming and Scripting
Hi guys,
I need to find multiple strings within files under a directory and secondly, to count how many files are there with these strings.
At present, i am able to do this in order to find one string (for example "abc"):
find <path> -exec grep "abc" {} /dev/null \;
Now for example, i... (2 Replies)
Discussion started by: frum
2 Replies
5. Shell Programming and Scripting
Hi,
I am new to unix and shell scripting,can anybody help me in sctipting a requirement.
my requirement is to get the latest directory the name of the directory will be like CSB.monthdate_time stamp
like CSB.Sep29_11:16 and CSB.Oct01_16:21.
i need to pick the latest directory.
in the... (15 Replies)
Discussion started by: sudhir_83k
15 Replies
6. Shell Programming and Scripting
Hello friends,
Plz suggest the find command,
How to search a string in a paticular string in miltiple files with current dirctory.:)
Thanks in advance.
Siva Ranganath Ch (2 Replies)
Discussion started by: sivaranga001
2 Replies
7. Shell Programming and Scripting
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies
8. Shell Programming and Scripting
Hi everyone,
Please help:)
I have a list of 1000 different files which comes daily to the directory.Some of
the files are not coming to the directory now.
I need to write a shell script to find the latest date and time of the files they
came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies
9. Shell Programming and Scripting
i have a directory in which there are executable files and these files are added at runtime. now i need a shell script which will be called at a certain interval. this shell script should find the latest executable file in that directory and start that executable. care should be taken that once the... (6 Replies)
Discussion started by: kvineeth
6 Replies
10. Shell Programming and Scripting
Hi,
I need to get the latest file from a list of files in a particular directory.
Please could anyone help me out to get the file.
Thank you,
- Jay. (1 Reply)
Discussion started by: Jayathirtha
1 Replies