10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am working on an outage script and I run a command from the command line which tells me the amount of generator failures in my market. The output of this command only gives me three digits to identify the site by. I have a master list of all sites in a separate file, call it list.txt. If my... (7 Replies)
Discussion started by: jbrass
7 Replies
2. Shell Programming and Scripting
Hi,
i have sh program which search for a file in a folder structure and provides its path. This is just used to see if that file exits more that once anywhere down the folder structure. I have used find command to search & printing it output on terminal.
I have attached screen shot of it.... (10 Replies)
Discussion started by: praveenkumar198
10 Replies
3. Shell Programming and Scripting
Hi All,
I have written the shell script which does the following :
a. Reads the *.cnf file content from the specified input folder path
b. Grep's some strings from the *.cnf file and writes the output in result file(*.cnf_result.txt) in output folder
c. Now, if we get new version of... (5 Replies)
Discussion started by: Optimus81
5 Replies
4. Shell Programming and Scripting
Hi,
I'd like to assign the output of the find command to a variable.
What I need is to run the find command, and if it returns zero files, the program exits.
so i'm trying to assign the output of the find command to the $var1 variable....and then if this is less than one, I echo a... (2 Replies)
Discussion started by: horhif
2 Replies
5. AIX
Hello All,
I am new to this shell scripting , I wanted to modify the output of my find command such that it does not display the path but only file names , for example I am searching for the files which are modified in the last 24 hours which is
find /usr/monitor/text/ -type f -mtime... (3 Replies)
Discussion started by: raokl
3 Replies
6. Shell Programming and Scripting
Hi guys -
I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good.
I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR.
MYSIZE=$(find /home/student/dir1... (8 Replies)
Discussion started by: DallasT
8 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
8. Shell Programming and Scripting
I'm using the below command to list files older than 2 hours but it returns redundant output, am I missing something.
# find . -mmin +120 -exec ls -l {} \;
total 0
-rw-r--r-- 1 root system 0 Oct 13 09:52 test1
-rw-r--r-- 1 root system 0 Oct 13 09:52 test2
-rw-r--r-- 1 root ... (5 Replies)
Discussion started by: mbak
5 Replies
9. Shell Programming and Scripting
when I do the find command from / , there are a lot of directories that I do not have access to and so I get
"find: cannot open ..."
How can I suppress these messages so only what was found is output.
I was thinking on
find / -name 'searchterm' | grep -v find
but this doesnt work
... (5 Replies)
Discussion started by: JamesByars
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am confused about the output of find command.
Please see the two find commands below.
When i put "*.c" i get lots of files. But when i put *c only i get only one file.
Any answer??
$ find . -name "*c"
./clarify/cheval/hp_server/rulemanager/rulemansvc... (3 Replies)
Discussion started by: shriashishpatil
3 Replies