Sponsored Content
Full Discussion: bourne shell not working
Top Forums Shell Programming and Scripting bourne shell not working Post 52365 by gillbates on Wednesday 16th of June 2004 06:27:50 PM
Old 06-16-2004
bourne shell not working

This code has worked for years and still does in my production environment. But it's failing in my development environment now. The cd works but the creation of node1, jnum, and node2 fails. Oddly the output shows a line from from the awk script at the end of the code during the setting of each of those three vars. The output is shown after the code. Does anyone have any idea what's going on? This is run under solaris. Thanks?






cd $LF_WORK_DIR
node1=`echo ${lcFile8} | awk '{print "G" substr($0,1,7)}' | tr '[a-z]' '[A-Z]'`
jnum=`echo ${node1} | awk '{i=length($0)-2;if(i<1)i=1;print substr($0,i,3)}' | tr '[a-z]' '[A-Z]'`
node2=`echo ${lcFile8} | awk '{print "S" substr($0,8,1)}' | tr '[a-z]' '[A-Z]'`
netrcFile=${LF_WORK_DIR}/${inputFile}.netrc
#
# reset the destination to the IBM
#
GEO_CMD="${LF_HOME}/.netrc_CMDS_${IBM_TARGET}_$$"
${LF_BIN_DIR}/LF_remove.sh NOWARN ${GEO_CMD} ${netrcFile}
#
# Create sed commands to edit the jcl
#
if [ ${exitCd} -lt 1 ]; then
sort ${workFile} ${outQMS} | awk -f ${LF_BIN_DIR}/LF_Merge_Geodata.awk > ${mergeIBM}







cd /appl/lfdevl/lfadmd/work
+ echo 00317909
+ tr [a-z] [A-Z]
+ awk {print "G" substr($0,1,7)}
awk: BEGIN: execute permission denied
awk: }: execute permission denied
awk: syntax error at line 3: `loanNum=substr' unexpected
node1=
+ echo
+ echo
+ tr [a-z] [A-Z]
+ awk {i=length($0)-2;if(i<1)i=1;print substr($0,i,3)}
awk: BEGIN: execute permission denied
awk: }: execute permission denied
awk: syntax error at line 3: `loanNum=substr' unexpected
jnum=
+ echo
+ echo 00317909
+ tr [a-z] [A-Z]
+ awk {print "S" substr($0,8,1)}
awk: BEGIN: execute permission denied
awk: }: execute permission denied
awk: syntax error at line 3: `loanNum=substr' unexpected
node2=
+ echo
netrcFile=/appl/lfdevl/lfadmd/work/00317909.geo.netrc
GEO_CMD=/appl/lfdevl/lfadmd/.netrc_CMDS_fmaenje_21636
+ /appl/lfdevl/lfadmd/bin/LF_remove.sh NOWARN
+ /appl/lfdevl/lfadmd/.netrc_CMDS_fmaenje_21636 /appl/lfdevl/lfadmd/work/00317909.geo.netrc
+ [ 0 -lt 1 ]
+ awk -f /appl/lfdevl/lfadmd/bin/LF_Merge_Geodata.awk
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bourne Shell Script

Hello, I'm throwing this out there as a novice to the Unix world...I've been working on a project that requires me to ouput (using the echo command) a list of names in a single column format, but the problem is the input is in row format followed by a blank space...If anyone could give me a... (2 Replies)
Discussion started by: dmhonor914
2 Replies

2. UNIX for Dummies Questions & Answers

Bourne-again shell

Hi guys !! well i'm still new in learning UNIX , and actually i'm still studying it by myself .. anyway, some people told me the Bourne-again shell is a good version of UNIX to work on , and i tried to download yesterday but i didn't know how to start it ...... the ReadMe file associated with... (3 Replies)
Discussion started by: mrsamer
3 Replies

3. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

4. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

5. Shell Programming and Scripting

Bourne/C shell help

Exercise Five Write a Bourne shell script which: • Professionalism: plan for this from the start. • Has one command line argument. • If the command line argument is a directory then the script should output the number of files in the directory. • If the command line argument is an ordinary... (2 Replies)
Discussion started by: moesom
2 Replies

6. Shell Programming and Scripting

Bourne shell & Korn shell

Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command .. $ echo $SHELL yields me /bin/sh Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies

7. UNIX for Dummies Questions & Answers

Bourne shell tutorial

hey guys, what is prolly the best way to learn bourne shell programming the easy way? I found many tutorials but I just cant seem to decide / chose which one is the best and suits my needs. could you recommend me some tutos? thanks (1 Reply)
Discussion started by: genius90
1 Replies

8. Cybersecurity

'Shell Shock' vulnerability in Bourne shell

A severe vulnerability was discovered in Bourne shell. Just google for: bash vulnerability ... for more details. (5 Replies)
Discussion started by: Cochise
5 Replies

9. Solaris

Alias is not working under Bourne Shell

Hi, Please assist me why HC alias is not working under this shell? root@singapore # grep HC /.profile alias HC='cd /var/tmp/HC/2015/`date +%B`' root@singapore # . /.profile Sourcing //.profile-EIS..... root@singapore # echo $HC root@singapore # HC HC: not found root@singapore # echo... (18 Replies)
Discussion started by: tprabhu1983
18 Replies

10. Shell Programming and Scripting

For loop in bourne shell is not working

I have a loop with cases I am working on Bourne shell for file in *.${Today}*.csv *.${Today}*.txt\ do case ${file} in sun_detail) do something ;; sum) do something ;; mod) do something ;; *) do something ;; (5 Replies)
Discussion started by: digioleg54
5 Replies
CRM_STANDBY(8)							  [FIXME: manual]						    CRM_STANDBY(8)

NAME
crm_standby - manipulate a node's standby attribute to determine whether resources can be run on this node SYNOPSIS
crm_standby [-?|-V] -D -u|-U node -r resource crm_standby [-?|-V] -G -u|-U node -r resource crm_standby [-?|-V] -v string -u|-U node -r resource [-l string] DESCRIPTION
The crm_standby command manipulates a node's standby attribute. Any node in standby mode is no longer eligible to host resources and any resources that are there must be moved. Standby mode can be useful for performing maintenance tasks, such as kernel updates. Remove the standby attribute from the node when it should become a fully active member of the cluster again. By assigning a lifetime to the standby attribute, determine whether the standby setting should survive a reboot of the node (set lifetime to forever) or should be reset with reboot (set lifetime to reboot). Alternatively, remove the standby attribute and bring the node back from standby manually. OPTIONS
--help, -? Print a help message. --verbose, -V Turn on debug information. Note Increase the level of verbosity by providing additional instances. --quiet, -Q When doing an attribute query using -G, print just the value to stdout. Use this option with -G. --get-value, -G Retrieve rather than set the preference. --delete-attr, -D Specify the attribute to delete. --attr-value string, -v string Specify the value to use. This option is ignored when used with -G. --node-uuid node_uuid, -u node_uuid Specify the UUID of the node to change. --node-uname node_uname, -U node_uname Specify the uname of the node to change. --lifetime string, -l string Determine how long this preference lasts. Possible values are reboot or forever. Note If a forever value exists, it is always used by the CRM instead of any reboot value. EXAMPLES
Have a local node go to standby: crm_standby -v true Have a node (node1) go to standby: crm_standby -v true -U node1 Query the standby status of a node: crm_standby -G -U node1 Remove the standby property from a node: crm_standby -D -U node1 Have a node go to standby for an indefinite period of time: crm_standby -v true -l forever -U node1 Have a node go to standby until the next reboot of this node: crm_standby -v true -l reboot -U node1 FILES
/var/lib/heartbeat/crm/cib.xml--the CIB (minus status section) on disk. Editing this file directly is strongly discouraged. SEE ALSO
???, ??? AUTHOR
crm_standby was written by Andrew Beekhof. [FIXME: source] 07/05/2010 CRM_STANDBY(8)
All times are GMT -4. The time now is 11:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy