If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > csh problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-21-04, 05:05
MANASH3250 MANASH3250 is offline
Registered User
 
Join Date: Jan 2004
Location: Singapore
Posts: 19
Angry csh problem

application : script will list the all running sybase servers on host, and user will pass the server name as argument or default would be the first server, script will set the environment for said server. 2 script is written to run from any env ksh or csh.

in case of csh , csh script is calling ksh script, its setting up env correctly but not showing echo statements of ksh, how to resolve this?

I have to accept i/p parameter for ksh script also.

================================================== ==
set env_list=`/bin/ksh -c ". /app/dbatools/bin/syb_env_setup.ksh > /dev/null ; env "`
foreach env_var ($env_list)
set env_var=`echo $env_var | sed -e 's/=/ /'`
setenv $env_var
end
~
~
syb_env_setup.ksh
-------------------
#!/bin/ksh
# server-specific parameters are read from a config file
umask 027
SERVER_LIST=`/usr/ucb/ps -auxwww | egrep '(dataserver|repserver)'|grep -v ONLINE | grep -v grep | /app/dbatools/per
l_link/bin/perl -p -e 's/^.*\s+\-[cC].*\/([a-zA-Z0-9_]+)\.cfg.*$/$1/g' | /app/dbatools/perl_link/bin/perl -p -e 's/
^.*\s+\-s\W*([a-zA-Z0-9_]+).*$/$1/g' | sort -r`

echo ""
echo "Running SYBASE SERVERS: "
echo "-----------------------"
echo "$SERVER_LIST"
echo ""
~
~
__________________
Manash Ranjan
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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