Shell script works fine as a standalone script but not as part of a bigger script
Hello all,
I am facing a weird issue while executing a code below -
When I execute it as a standalone code it works fine but when I execute it as a part of below mentioned script, it fails -
Param1,Param2, Param3 and Param 4, Param 5 are required as a command line arguments.
Error is below -
My point is why this code works as a standalone one and not with a script in the same environment. LinuxLinuxLinux
I am using AIX.
Any pointers will be greatly appreciated.
---------- Post updated at 08:38 AM ---------- Previous update was at 05:22 AM ----------
@VBE
should it not be:
No, since script accepts 3 parameters, UKBA is area name and has to be hardcoded, date is the date, 3 is number of files.
Last edited by vbe; 07-11-2017 at 01:15 PM..
Reason: code tags...
Hello all,
This beats me. I have a script that executes some commands and redirects their output to some text files that I will parse. The commands are along the lines of:
dsmadmc -id=admin -pa=admin -outfile=/home/tools/qlog.txt q log f=d
If I just run the script it works. If I execute... (2 Replies)
how can i print the output of the shell script in bigger size
eg: echo " hello world"
i want to print this in the output with bigger size in the middle of the screen.
can someone please help me out in that (2 Replies)
ok i have a very simple UNIX script
#!/bin/bash
TERM=ansi;export TERM
PFCMARK=25;export PFCMARK
umask 0000
PFUMASK=000;export PFUMASK
#run for filepro menus and exectuables
echo "###########File Modification Log.############\r" > "/public/appl-fp$(date +%m-%d-%Y).txt"
find /appl/fp/... (10 Replies)
HI,
I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging.
here is the core of the script
CFG_FILE=tab25.cfg
sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c
do
#echo "jobs output"
#jobs
#echo "jobs... (13 Replies)
Hello All,
This is driving me nuts. Wrote a very simple script (it's in csh so sorry about that). Just something very simple though. Here is the catch. Works great from command line sometimes. Other times it runs no errors or anything but I never receive an email. Never runs from crontab... (6 Replies)
Hi,
I have a problem with a SED script that works fine on AIX but does not work properly on a Solaris system.
The ksh script executes the SED and puts the output in HTML in tables.
But the layout of the output in HTML is not shown correctly(no tables, no color). Can anyone tell if there is... (7 Replies)
Guys,
I need you help please.
The script below is not working correclty for checking via a awk/if statement . Can you tell me what i am doing wrong in the script code "if($1 == "$RETENTION_LEVEL") "
Syntax
RETENTION_LEVEL=`echo $LINE | cut -f2 -d" "`
echo " ==============... (4 Replies)
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
*/5 * * * * /home/myfolder/abc.sh... (17 Replies)
Hello Team,
As a part of my job we have made a script to automate a service to restart frequently.
Script having two functions when executing it's should find the existing service and kill it, then start the same service . Verified the script it's working fine when executing... (18 Replies)
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)