look for a contracthead file first and if the contract head file does not exist on day1 exit script.
Now on day2 if contracthead exists or not run the script uploading files in order
such as contract line then contract contact
so the whole order on day1 is
contracthead
contractline
contractcontact
on day2
if it exists or not run the script like the order above even if files are missing.
Now this is the script i came up with.
basically the if statement for the days block seems not be working
it works determinig day 1 and 2 but it does nto run the script as i want it to.
So far.g if it has a contracthead ont he first day and no days file.
It will upload contract head and go to the else statement and create the days file. It should not do this because the contracthead file exists. If it did not exist then the days file will be created.
You are testing for the existence of a file with an asterisk truly in the filename. Removing the quotes will make it work provided there is exactly one matching file name.
elif ls int_sap_contracthead_*.txt >/dev/null 2>&1
will work with many names.
if [ "$file" = "int_sap_contractline*.txt" ]
also not gonna fly. Double brackets would work if you unquote the pattern. Or use a case statement.
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Hi,
I am having a shell Script which i need to modify. I am new to shell scripting , needs help. The Logic which needs to be incorporated is as follows :-
The script need to check the length of first Line in a data fine and of the length of the file is > 130 then validated the input... (2 Replies)
Hello,
i have below shell script to process ftp get from server and create file list afte finish.
this shell scipt has 6 parameter input.
unfortunately, it is only working to get the file and terminated before creating file list.
please help.
thanks,
#!/bin/ksh
## example usage :... (3 Replies)
Hi,
My objective is to make a shell script that, when run, you can input multiple links at once.
text is then inserted between the http:// part and the following url.
example : http://google.be ==> http://sometext.google.be
it would be great if it could then open all the created links (wich... (5 Replies)
I want to use an awk for the following scenario but not sure if it will work or not. I have two input file: F1 and F2
F1
02
05
08
F2
00
01
02
03
04
05
06
07
08
09
10 (1 Reply)
Hi GURU's,
I'm using a Shell Script to send email's as an attachment.
I'm Storing the email address in a table and catching in a variable.
MAILLIST=`noarg sqlplus -s $OraUsr << EOF
set heading off
set feedback off
set echo off
SELECT email_ids
FROM tpemail_table
WHERE... (9 Replies)
The following script is meant to check the presence of a file - called filename0.94.tar.gz - and uncompress it:
#!/bin/sh
# check presence of file
VERSION=0.94
if ; then
# file not present: abort
echo "Files cannot be found."
#exit 1 (commented out this line, so we can see how the... (2 Replies)
Ok, So up front I'm going to say that I'm a very elementary scripter, and I tend to use tools I don't fully understand, but I shotgun at something until I can get it to work...that said, I can't for the life of me understand why I can't get this to go down the way I want it to.
The goal:
-to... (6 Replies)
Hi All,
I am new to Shell scripting.
I have a log file containing XML Messages.Each XML Message is accompanied with a timestamp.I need to count the the number of messages that get logged in a particular timeinterval.Is there any command/Syntax to achieve this.
Any code/example is... (5 Replies)