03-20-2012
Hi!
Quote:
#!/usr/bin/ksh
# ==============================================================================
# Start/Log SH Script
# ==============================================================================
# Parameters
#. $HOME/.profile
. /app/ICSASC00/dts/sh/params.sh
cd $DTS_SH_DIR
LogDir=$DTS_SH_LOG
# log each execution
ThisScriptFullName="$0"
ThisScriptName=`basename $0`
ThisScriptName=${ThisScriptName%.*}
ThisScriptDir=`dirname $0`
ThisScriptLogFullName="$LogDir/$ThisScriptName.log"
#echo ThisScriptLogFullName=$ThisScriptLogFullName
Now=$(date +"%Y_%m_%d_%H_%M_%S")
echo "Execution begin at $Now" >>$ThisScriptLogFullName
RunScriptName=`basename $1`
RunScriptName2=${RunScriptName%.*}
# create log file for each execution
LogName=$RunScriptName2"_"$Now".log"
#echo LogName=$LogName
LogFullName="$LogDir/$LogName"
echo "%LogFullName%"=$LogFullName
echo "$1 $2 $3 $4 $5 $6 $7 $8" >>$ThisScriptLogFullName
echo "log: $LogFullName" >>$ThisScriptLogFullName
!!! call like (/usr/bin/ksh sqlldr rows=1000 userid=$pSourceConStr data=$vFlatFile control=$vCtlFile log=$vLdrLogFile bad=$vLdrBadFile >sqlldr_log.log)
!!! instead of that ($1 $2 $3 $4 $5 $6 $7 $8 >>$LogFullName) !!! this call is in 3.th script
!!! if I comment out this call, works fine
echo "%Return_Prameter%"=$?
echo "%Return_Prameter%"=$? >>$ThisScriptLogFullName
Now=$(date +"%Y_%m_%d_%H_%M_%S")
echo "End at $Now" >>$ThisScriptLogFullName
exit $?
of course I meant to comment out that call not directly from this script but from 3.th script
Quote:
echo "%Return_Prameter%"=$?
echo "%Return_Prameter%"=$? >>$ThisScriptLogFullName
Now=$(date +"%Y_%m_%d_%H_%M_%S") echo
"End at $Now" >>$ThisScriptLogFullName
exit $?
I got the echo-s to file >>$ThisScriptLogFullName
I do not get the echos to display and the exit value.
My question is how can I call the external program to do not redirect the echo-s from display and exit value
Thanks,
Mroki
Last edited by mroki; 03-20-2012 at 03:31 AM..
10 More Discussions You Might Find Interesting
1. AIX
HI
I am trying to write a shell script which accepts two strings from user and finds the matching number of characters in those two
ex:
string 1 abcd
string 2 bcgt
result is bc (matching characters)
pls provide me with a basic script for doing that (1 Reply)
Discussion started by: akmtcs
1 Replies
2. Shell Programming and Scripting
Hi All,
I have this script which doesn't work on AIX ksh shell..
# ! /usr/bin/ksh
grep -irl "6000" /home/applmgr/xyz > file_list_port.log
xargs sed -i 's/6000/6010/g' < file_list_port.log
But this same script has worked perfectly on linux bash shell..
Could anyone please share... (4 Replies)
Discussion started by: a1_win
4 Replies
3. Shell Programming and Scripting
Hello all,
I am currently try to learn the linux operating system as well as some bash programming. I have come across some online course work which has been very helpful, I have been working through some assignments and since I have no teacher to ask I have come to you experts.
So the... (6 Replies)
Discussion started by: g2axiom
6 Replies
4. Shell Programming and Scripting
I have a script that "runs" a script. For example:
./runscript.ksh pcnmc01.ksh
runscript puts pcnmc01.ksh into the background with log output going to the logfile.
After executing the command, I get this output:
Running script in the background: pcnmc01.ksh
Logfile:... (2 Replies)
Discussion started by: Eben Yong
2 Replies
5. Programming
hii friends i m fairy new to c programming.can any one suggest some good websites and some good books for beginner (6 Replies)
Discussion started by: pankajchandel
6 Replies
6. AIX
Hello,
For some time I have intellistation 9111-285 and I installed AIX 6.1 on it. As a complete beginner I have 2 questions in general about AIX and two specific:
1. is the SMS (system management services) part of AIX? As I noticed when I had Yellowdog Linux installed they weren't available?... (2 Replies)
Discussion started by: kenashkov
2 Replies
7. Shell Programming and Scripting
I started to learn KSH
I am doing some exercises from the book
$ umask =rx, u+w
$ print Keep track of everythine > file1.out
$ print Be careful >> file1.out
ksh: file1.out: cannot create
$ umask -S ... (1 Reply)
Discussion started by: solaris_user
1 Replies
8. Shell Programming and Scripting
Hi all,
I'm a fairly new beginner with shell programming and python programming. I have a mac (mountain lion OS 10.8.2) and use the terminal for programming. I'm trying to use the unix to easily organize some language data that I am working with. Basically I have to word lists, that I need to... (2 Replies)
Discussion started by: nomadblue
2 Replies
9. Shell Programming and Scripting
So guys basically I was really sick and couldn't attend the labs and lectures and I went to my lecture hoping he would say ok I will help you from the start but he just said google it. So If it's possible to make the assignment and explain more in detail why is that would be really helpfull.
I can... (1 Reply)
Discussion started by: Joola94
1 Replies
10. Shell Programming and Scripting
My variable contains the following string
I wish to replace \n with "space" so the expected output is:
I understand that the /n is not a new linein this case.
I'm on AIX using ksh shell. Below is all that I tried.
echo $str | sed -e "s#\n# #g";
echo $str | sed -e "s#\n#' '#g";... (5 Replies)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT PHP
locale_get_display_script
LOCALE_GET_DISPLAY_SCRIPT(3) 1 LOCALE_GET_DISPLAY_SCRIPT(3)
Locale::getDisplayScript - Returns an appropriately localized display name for script of the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getDisplayScript (string $locale, [string $in_locale])
DESCRIPTION
Procedural style
string locale_get_display_script (string $locale, [string $in_locale])
Returns an appropriately localized display name for script of the input locale. If is NULL then the default locale is used.
PARAMETERS
o $locale
- The locale to return a display script for
o $in_locale
- Optional format locale to use to display the script name
RETURN VALUES
Display name of the script for the $locale in the format appropriate for $in_locale.
EXAMPLES
Example #1
locale_get_display_script(3) example
<?php
echo locale_get_display_script('sl-Latn-IT-nedis', 'en');
echo ";
";
echo locale_get_display_script('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo locale_get_display_script('sl-Latn-IT-nedis', 'de');
?>
Example #2
OO example
<?php
echo Locale::getDisplayScript('sl-Latn-IT-nedis', 'en');
echo ";
";
echo Locale::getDisplayScript('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo Locale::getDisplayScript('sl-Latn-IT-nedis', 'de');
?>
The above example will output:
Latin;
latin;
Lateinisch
SEE ALSO
locale_get_display_name(3), locale_get_display_language(3), locale_get_display_region(3), locale_get_display_variant(3).
PHP Documentation Group LOCALE_GET_DISPLAY_SCRIPT(3)