You used && where ; would suffice.
Its not about the numbers of chars used, but its better to use a condition, which && is, only when it is required.
Since you will display only once, you could put the message to a variable, and print it at the end.
But i guess this could be called preference...
And to be honest, in my opinion clear is not required at all.
I need to create a script called 'find_data' that will search a file by passing two parameters to it :confused: . I'm pretty good with scripting but haven't really gotten into sed and awk that much (and no perl whatsoever). I'm really at a loss and need to get something working in the next... (14 Replies)
Nice forum for noobs like me to UNIX. With that said, I need assistance.
I am trying to make a script to search files for a specific date and string within the file. Then I need the script to move the file that have the specific date and string to a directory. In the interim I have been manually... (7 Replies)
HI all,
I am trying to find files that have .cc3 file extenstion folder using this script below, but this fails as there are files in the folder and i get a message saying i have no files. Please anyone reveiw and let me know if i am missing anything.I am working on this from two days and i... (9 Replies)
hi all
i have a requirement to write a script which will serach a file in a particuar location for 3 hours from the time when the script is run.if during this period the file arrives in a particular location then this will transmit the file to a other server.please help me writing the script which... (1 Reply)
I need to write a small shell script which does the following :
I have a file : root/var/log/ocmp/ocmpclient.log
This is a log file which is continuosly getting updated . I have to keep looking into this file all the time. I have to look for four keywords, "File Detected", File Sending",... (2 Replies)
Hi,
I am trying to write a script to search a log- IPaddress being the search criteria, I would ideally like the script to ask the ipaddress
Enter IP address - 244.258.27.225
And the ideal result would be for the script to get all the entries in the log file for a particular IP address,... (3 Replies)
Dear All,
I would like to create a Unix script which basically searches for files which are more than 2 days old and copy only the new files to the destination. What i mean is if the destination may have most of the files, it may not have only last 2 to 3 days file.
I am able to create the... (6 Replies)
Hi all,
Hope everyone is doing fine. I need a help in creating search script. I have file which contains job names and job recs. I need to select specific job name and next line which is job rec
job (BLREEXTT) {
Record B${cycle}${month}${year}000075;
follows BLCYRRTCHKT;
... (5 Replies)
Hi
Obviously first time poster here. I have been set the task of creating a network diagram for each of our clients in the business i work for. After identifying ip adresses of firewalls name servers and the like im got to the point where i found it impracticle to go through 254 ip address and... (6 Replies)