Hello, I wanted to delete all files which are placed 14 days back. Here is my below script. My script works very well and it deletes all files 14 days back.
I wanted to display message incase if the delete script is not successful. The below script returns always successful. But the directory /ods/apps/report/download/archive/archive/xxx is wrong one. How can i trap if there is any failure...
Last edited by vgersh99; 10-13-2009 at 01:42 PM..
Reason: code tags, PLEASE!
Hello there!
Here is my problem. I hope I can get some help about it.
I need to know how can I get the return code of an application in the Unix shell script.
The script is like below:
PREVIOUS STATEMENT & VARIABLES
sqlplus scott/tiger @$sqldir/$sqlscript
NEXT STATEMENT (Like... (7 Replies)
Im a newbee..
I have a script which runs few times daily. I want to write another script which should pick up the latest log generated from the last run of the first job and trigger a thrid script if the first script runs successfuly.
Please help...
Cheers (1 Reply)
there is something wrong with my system. when I do this:
diff file1 file1 && echo 1
the output is 1.
but
diff file1 file2 >/dev/null && echo 1
output nothing
while
diff file1 file2 >/dev/null || echo 1
shows 1.
the same with "grep" return status. they are both GNU utilities.... (5 Replies)
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Hi All,
I need to return value to the main shell script, depending on whether the UPDATE command in the embedded pl/sql is successfu or not.
#!bin/ksh
updateStatus=`sqlplus --conn details-- << EOF
DECLARE
var_rows NUMBER;
BEGIN
update table_name
set column_name =... (7 Replies)
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Hi All,
Need some help like how to exit from the script after updating the column in data base.
db2 connect to DB
STATUS=$(db2 "SELECT STATUS FROM XYZ )
echo $STATUS
Initially the status value will be '4' or 'NOT YET RUN'.
The Shell script has to run until the status value is updated... (7 Replies)
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT MINIX
ar
AR(1) General Commands Manual AR(1)NAME
ar, aal - archivers
SYNOPSIS
ar [dmpqrtx][abciluv] [posname] archive [file ...]
aal [dpqrtx][clv] archive [file ...]
EXAMPLES
ar r libc.a sort.s # Replace sort.s in libc.a
ar rb a.s libc.a b.s
# Insert b.s before a.s in libc.a
DESCRIPTION
Ar allows groups of files to be put together into a single archive. It is normally used for libraries of compiled procedures. Aal is like
ar, but is to be used with the ACK compiler. The following keys are allowed:
d: Delete. Ar will delete the named members.
m: Move named files. Ar expects a, b, or i to be specified.
p: Print the named files (list them on stdout)
q: Quickly append to the end of the archive file.
r: Replace (append when not in archive).
t: Print the archive's table of contents.
x: Extract
The keys may optionally concatencated with one or more of the following:
a: After posname
b: Before posname
c: Create (suppresses creation message)
i: Before posname
l: Local temporary file for work instead of /tmp/ar.$$$$$
u: Replace only if dated later than member in archive
v: Verbose
SEE ALSO anm(1), asize(1), nm(1), size(1).
AR(1)