04-02-2008
. thescript dont work in ksh, my script is on the same directory
but . ./thescript work for sourcing in same directory
thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm new to unix scripting.How can i call a script from another script.
I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted.
I tried using
#!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh
My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies
2. Shell Programming and Scripting
I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below......
vi hairy
bear=`grep bear animals`
if
then
ksh more_animals
fi
If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies
3. Shell Programming and Scripting
Hey guys,
I'm not the best AIX scripter about but I can flounder my way thru them to create what I need.
Anyhow, I have various scripts that perform various actions and processes. I was tasked to come up with a single form of logging that all the scripts could implement so that the output... (2 Replies)
Discussion started by: isawme
2 Replies
4. Shell Programming and Scripting
Hi,
Using AIX 5.3 and Ksh.
/>ls -al /usr/bin/ksh
-r-xr-xr-x 5 bin bin 237420 Apr 10 2007 /usr/bin/ksh
/>
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have... (2 Replies)
Discussion started by: troym72
2 Replies
5. Shell Programming and Scripting
Hi
I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email.
For example
-------
Script ABC
-------
a.ksh
b.ksh
c.ksh
I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies
6. Shell Programming and Scripting
hi,
i can see in a script
it contains
var=$(
myFile | grep -i err
)
why has this person done it like this? why not just
var=`myFile | grep -i err`
thanks (9 Replies)
Discussion started by: JamesByars
9 Replies
7. Shell Programming and Scripting
Hi,
I have written a function which will blink a text "Scanning...". Now in the main script when I am doing the scan in the server I want to call this function so that user will see a blinking text on the screen and at the same time script will proceed will the scan function. Once scan is... (2 Replies)
Discussion started by: suhasingale
2 Replies
8. Shell Programming and Scripting
This works
#!/bin/ksh
FILE="file.txt"
dosumtin () {
date >> FILE
}
for i in {1..5}
do
dosumtin
done
cat $FILE
But instead of building a file, I want to do the same with a var or an array. That is, to build one that saves all 5 of the subs execution responses in a var or an... (8 Replies)
Discussion started by: popeye
8 Replies
9. Shell Programming and Scripting
Can Someone please explain why BEGIN and END statement is used inside function? How does that help in scripting?
function fileformatting
{
CleanupMask="xXxX"
sed 's/^.//' < ${AllFile} > ${AllFile}.tmp
echo $(wc -l ${AllFile}.tmp)
`awk -v CleanupMask=${CleanupMask} '
BEGIN... (2 Replies)
Discussion started by: later_troy
2 Replies
10. Shell Programming and Scripting
I'm able to read & print an array in varaible called "filelist"
I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function.
Unfortunately it does not print the entire array from inside the funstion's loop.
#/bin/ksh... (5 Replies)
Discussion started by: mohtashims
5 Replies