It depends... If the file is available via web, you can use curl and parse the response later, if not, FTP access might be useful, e.g. login, list files, get the answer, and if the file is there, send mail.
If there isn't FTP access, but SSH instead - good, logic as follows :
I have automated my ftp session as given in on of the previous threads as:
#! /usr/bin/ksh
HOST=remote.host.name
USER=whoever
PASSWD=whatever
exec 4>&1
ftp -nv >&4 2>&4 |&
print -p open $HOST
print -p user $USER $PASSWD
print -p cd directory
print -p binary
print -p get xyz
wait... (3 Replies)
Hi All,
Good Day.
need one help regarding unix script.
i have to check whether the particular file is there or not in another ip address.
suppose....there is file in this ip address 2.160.64.130 in particualar location.
i have to veify this from another ip adress(Say 2.160.64.131).if the file... (2 Replies)
I m having trouble in a script.I need To write a script that will check for Following Errors in Logs Files,i.e files having Extension .log
The erros are
2008-01-01 15:19:11,822 ERROR - ORA-01115: IO error reading block from file 51 (block # 717090)
ORA-01110: data file 51:... (4 Replies)
Hi,
I need one line command to display all files that ends with .scr.
Example: In a directory I have 10 files, out of that 4 files have filetype extension .dat and 4 files with .scr and 2 files with .txt.... In this i want to display only files that ends with .scr.
I tried some commands,... (2 Replies)
I have tried the following script to check for the presence of any files in a folder:
if (-r *) then
goto ZipMiscFiles
else
echo ""
echo " No Miscellaneous files found. Exiting program."
echo ""
exit
endif
The -r works fine with the wildcard in combo with other... (4 Replies)
Is there code in Cshell scripting to check for the presence of any files in the current directory (and only the current directory)? I tried:
if (-r *) then ...
but Cshell doesn't like that.
Thanks,
Paul Hudgens (0 Replies)
hi all
am very new to unix scripting.....
i have a work right now that i should complete by End of Day :(
scenario is
i get some x number of files with .csv extension on a specified path at my operating system. the names of the files are as follows . the record lay out is same... (0 Replies)
i have two files which contains some fields separated by columns as
03/29/1999 08:48:12 02 172.16.114.50
03/29/1999 09:08:00 480 172.16.112.100
Both of the files do have the same format
I want the script which will take two such... (3 Replies)
Hi,
I am trying to print a listing of files from the top level directory, check to see if any files have the same name as the top level directory name and if so, cd to that file and list the files under it. Don't know how to check for the file in the next level.
What I have so far:
... (6 Replies)
Hi,
My requirement is,there is a directory location like:
:camp/current/
In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)