10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script:
#!/bin/bash
logfile=/opt/jboss-eap-6.3/standalone/log/server.log
tail -fn0 $logfile | \... (7 Replies)
Discussion started by: nms
7 Replies
2. UNIX for Beginners Questions & Answers
I have a script that sorts and processes unsorted files to newly created directories.
Its working great, but I am trying to understand the leanest method to get the script to create an additional file within each newly created directory that:
Contains a list of all files in the directory... (4 Replies)
Discussion started by: Braveheart
4 Replies
3. Shell Programming and Scripting
I am trying to check whether two files are empty or not using below if condition but its checking for only one file
if ]
Again I tried
if && ]
Need your assistance (2 Replies)
Discussion started by: Aditya_001
2 Replies
4. Shell Programming and Scripting
I'm doing a script thats check if mylogfile.log is bigger then 5000 but i dont know how to write it.
thanks in avance. (6 Replies)
Discussion started by: Froob
6 Replies
5. Shell Programming and Scripting
Hi All,
I m very new to unix...i jus want to chk the content of file.
ma requirement is
if file has a content then
display it
else
dont display or something
pls specify which loop shalli use either for or while?? (20 Replies)
Discussion started by: navsan
20 Replies
6. Shell Programming and Scripting
if ; then
cp /tmp/testfolder/*.* ~/new/logs/
else
echo "No files today"
exit
fi
The problem is this doen't work when there is more than 1 file. Please tell me how to
take the latest file and check the size of the file in a directory (1 Reply)
Discussion started by: sandy1028
1 Replies
7. Shell Programming and Scripting
I want to write a batch job (ksh) with the following requirement
we have file feeds coming to our system from other team,
if the file size is greater than expected then we dont need to process the file for the day
and need to archive the file and send email notification to the manager saying... (5 Replies)
Discussion started by: sithara
5 Replies
8. Shell Programming and Scripting
I have a shell script that takes a file and uses "syncsort" to sort contents.
I want to add a condition to check whether the input file is textual or binary format. If textual, the "syncsort" will be used to sort the files contents. Otherwise, the sorting process will be skipped.
Note that the... (3 Replies)
Discussion started by: synthea
3 Replies
9. Shell Programming and Scripting
Hi ,
I have a file called "X" . the content of X are
X
--
abc
def
and i have a file called "Y" , the content of Y are
Y
--
erty
sdss
s
abc
sfs
def
I need to check if the content of file X is contained in Y.Only unix (7 Replies)
Discussion started by: giri_luck
7 Replies
10. Shell Programming and Scripting
Hi All,
I am in small problem..
i have one script which transfers some big files to my ftp usign normal command like put ....
my problem is how to check whether my file have been transferred successfully on ftp or not...
i know only inside ftp we have option like 'size' command which... (2 Replies)
Discussion started by: Shahul
2 Replies