The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Returning Strings from C program to Unix shell script venkatesh_sasi High Level Programming 24 11-28-2007 04:48 AM
returning to the parent shell after invoking a script within a script gurukottur Shell Programming and Scripting 5 09-26-2006 07:05 AM
Returning Strings from C program to Unix shell script satguyz High Level Programming 11 12-30-2005 03:41 PM
find command not returning any result rraajjiibb UNIX for Advanced & Expert Users 4 07-23-2004 05:05 PM
Returning Values (shell Script) jennifer01 Shell Programming and Scripting 3 11-29-2001 06:31 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-22-2008
clnsharma123 clnsharma123 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
The shell script is not returning proper result

Can anybody pls look into this script and tell me where I went wrong. After running this script, it is showing like "Trying to overlay current working directory ABORT!!!"
:-(


ARGCNT=$#
if [ "${ARGCNT}" -ne 2 ]
then
echo "Two parameters are needed for this shell "
echo "Please try again with the following parms: "
echo "first parm = release "
echo "second parm = fully qualified tar file name "
echo " "
exit 1
else
RELEASE=$1
TARFILE=$2
fi

###############################################################
### verify release exists
###############################################################
if [ ! -d ~/${RELEASE} ]
then
echo "Release ${RELEASE} does not exist!"
echo "Verify parameters and try again"
echo " "
exit 1
fi

#######################################################
### verify tar file exists
#######################################################
if [ ! -a ${TARFILE} ]
then
echo "Tar file ${TARFILE} does NOT exist!"
echo "Verify parameters and try again"
echo " "
exit 1
fi
if ll ~/active | grep ${RELEASE}
then
echo "Trying to overlay current working directory ABORT!!!"
exit 99
else
cd ~/${RELEASE}
chmod -R u+w *
zcat ${TARFILE} | tar xvf -
chmod -R u-w *
echo " "
echo "loadTarFile.sh DONE"
fi
  #2 (permalink)  
Old 01-25-2008
rein rein is offline
Registered User
  
 

Join Date: Dec 2004
Location: Zürich
Posts: 146
What are you trying to do test with:

if ll ~/active | grep ${RELEASE}
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0