Search Results

Search: Posts Made By: alexkav
29,174
Posted By alexkav
Ok, here's using grep: find . \( -name...
Ok, here's using grep:

find . \( -name success -prune \) -o \( -name error -prune \) -o -name "G*" -print) | grep '[0-9]\{6\}'

Thanks,
alexkav
29,174
Posted By alexkav
help again
Hello agian, is it possible to adjust the "find" command to only find files beginning with "G" and followed by numbers?

For example:

good: G102030
bad: GFI_UPLOAD.log

Thanks,
alexkav
29,174
Posted By alexkav
Perfect. Thank you!
Perfect. Thank you!
29,174
Posted By alexkav
Question: non-recursive find syntax
Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make...
5,371
Posted By alexkav
thanks
Thanks for taking another look. I see your point about "touch newtime" only if bombing...

alexkav
5,371
Posted By alexkav
gjduff, you still there? I'm trying to make the...
gjduff, you still there? I'm trying to make the script check every 10 seconds for a new file then update a logfile. Can you see what I'm missing?

Thanks,
alexkav

#!/bin/ksh
...
5,371
Posted By alexkav
Thank you!
Thank you!
5,371
Posted By alexkav
Ok, this is better. Thanks again. #!/bin/ksh...
Ok, this is better. Thanks again.

#!/bin/ksh
touch newtime
sleep 10

NEW=`find . -type f -name "G*" -newer newtime`

if [ -z $NEW ]; then
echo "bombing..."
exit 1

else
...
5,371
Posted By alexkav
Oops, hang on. I think my removing the temp did...
Oops, hang on. I think my removing the temp did something bad. Let me try again...
5,371
Posted By alexkav
gjduff - thanks
gjduff, thanks alot for your help. I made a small change to your script to get rid of the temp part, since I don't want to write anything to the dir. How can I get rid of the "./" in the output? (see...
5,371
Posted By alexkav
scripting help with touch and sed
Hello, I am trying to write a simple script to wake up every 300 seconds and look for a new file in a directory (e.g., "G102005"), remove the "G" from the file name, then print the new filename.
...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 10:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy