Here is a code snippet, from a shell script you should be able to modify to suit quite easilly. But as you haven't shown me what you've tried or your code I can't be more precise.
I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Hi Guys
I m posing this new thread as I didnt get satisfactory result after running search here.
My requirement is very simple (using shell script)
I need to findout what all file systems are mounted -> Then I need check the health of that file system - by disk usage & by doing a simple... (8 Replies)
i need to write a shell script..
connecting to another server using ftp and check whether the file ter.txt is exists there or not.
i have written scirpt partially,as i new to Unix.
ftp -inv $FTPHOST > $TEMPFILE1 2> $TEMPFILE1 << EOF
user $FTPUSER $FTPPW
binary
prompt
${CD}
ls *.txt... (11 Replies)
I am running a C shell script. I have an output file from a previous step and I need to run "something" in the next step to check if the file is empty. If the file is empty, then the job script should finish EOJ. If the file is not empty then the job script should abend.
Please help
Thanks. (4 Replies)
Hi,
I am writting a script, which accepts input file as parameter.
Input file name is aa_bb_cc_dd_ee.<ext>
I need to check that input file name should be of 5 fileds.
Please help me out. :confused: (7 Replies)
Hi,
I have a file with few values in it. I need script help to read file line by line and check:
1/if it's a file (with extension eg .java .css .jar etc )
or
2/if it's a file without extension and treat it as a directory and then check if the directory exists in working copy else create one... (6 Replies)
Hi all,
i am getting the file through sftp from a location in the name of 20141201_file.txt (iam getting the file on daily basis with date appended at the beginning)
so before going to my actual process ,i want to check whether today files and yesterday file are same or not(which i used to... (3 Replies)
Hi Experts,
I am not good in writing script. Just stared.I am looking for shell script to check following parameters.
1) Number of files on remote Linux SUSE server.- Any directory and sub directory.
2) I should define number of files in script. Files should be variable.
3) Age of... (2 Replies)
Hi All,
I need to check a file whether it exists and also whether it is empty or not. I have a code for this but it is not working as per my requirement. Can anyone pls suggest me on this.
function funcFLSanityCheck
{
if
then
echo "${varFLSentFileListPath}/${varFLSentFileName}... (7 Replies)
While I am trying to check the filename/s in IF statement of a shell script (RedHat Linux 6) I am getting below error:
File check:
filename_time2=`date --date='yesterday' +%Y-%m-%d`
cd /location/of/the/files/to/copy
if
then
cp server.log-$filename_time2* ../archive/new... (5 Replies)