10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
#! /bin/ksh
#first.sh
echo "b4 set exit as return"
alias exit=return
echo "call second"
. ./second.sh
echo "after second"
#. ./third.sh
unalias exit
echo "ho lanciato il terzo"
=================//
#second.sh
echo "in scond"
exit
==============//
the above code works in k... (2 Replies)
Discussion started by: mprakasheee
2 Replies
2. Shell Programming and Scripting
Hi,
I am running this on Redhat 5.10
I have a simple test script called test.sh which has the following
contents and it uses the BASH shebang.
-------------------------------------------------------------
#!/bin/bash
eval `/tmp/filereader.pl /tmp/envfile.txt`
echo "TESTPATH=$TESTPATH"
... (28 Replies)
Discussion started by: waavman
28 Replies
3. UNIX for Advanced & Expert Users
Why does dot sourcing of ksh functions behave so differently between AIX, Solaris, and Linux? How can I make Linux behave the way I want in the test I show below?
I have a library of interdependent functions I have developed and use in ksh in AIX. They also run in Solaris. Now I am migrating... (9 Replies)
Discussion started by: charles_n_may
9 Replies
4. Shell Programming and Scripting
My manager required that i keep the hostnames and username and password in a separate file when creating my sftp script.
(Don't mention passwords and sftp...I've talk to him about this several times)
I have a list of hostnames that have to be read in a loop in my main script.
I don't know... (3 Replies)
Discussion started by: MJCreations
3 Replies
5. Shell Programming and Scripting
ok, so I have a shell script that can be called using the first argument ($1) or not. This argument is a word (Tim for example) and not an actual flag (-x for example). If I call the script with an argument and call the same script without one, it believes that I provided an argument. Note here... (2 Replies)
Discussion started by: mrwatkin
2 Replies
6. UNIX for Dummies Questions & Answers
Hi friends,
I have a script that sets the env variable path based on different conditions.
Now the new path variable setting should not done in the same terminal or same shell.
Only a new terminal or new shell should have the new path env variable set.
I am able to do this only as follows:
>cd... (1 Reply)
Discussion started by: sowmya005
1 Replies
7. UNIX for Dummies Questions & Answers
I am setting my PATH & LD_LIBRARY_PATH through .cshrc file while sourcing it on a old shell i am getting the error word too long .and the changes which i anm doing doesn't get updated .
i am in a multi user environment so the only way to do the changes only for my shell is to do it that way.
... (1 Reply)
Discussion started by: mobydick
1 Replies
8. Shell Programming and Scripting
Hi All,
I've searched through the forum for a solution to this problem, but I haven't found anything. I have 2 script files that are in different directories.
My first script, let's call it "/one/two/a.sh" looks like this:
#!/bin/sh
IN_DIR=`dirname $0`
CUR_DIR=`pwd`
cd $IN_DIR... (4 Replies)
Discussion started by: mrbluegreen
4 Replies
9. Shell Programming and Scripting
Hi
I made a small script which uses ksh.
When i run the script then i get the following error
However when i run each of the commands on the commandline they get executed and provide the desired output. i cant figure out why the script is not running.
Kindly Help
Thanks in... (3 Replies)
Discussion started by: PradeepRed
3 Replies
10. Shell Programming and Scripting
This is a search script that I have developed. It finds the records that I look for. However the only thing I want the program to do now is to display a message such as 'Not Found' to appear when a record is not found. So far when a search doesn't display a record, the screen is blank.
... (14 Replies)
Discussion started by: Warrior232
14 Replies