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
cmcp(1m)																  cmcp(1m)

NAME
cmcp - Copy files between Serviceguard nodes SYNOPSIS
cmcp [-rv] [src_node:]src_file [...] [dest_node:]dest_file DESCRIPTION
cmcp copies files and/or directories between Serviceguard nodes. cmcp is limited in several ways. cmcp is best suited for situations where other remote copy facilities are not available. For a more full featured tool for copying files between Serviceguard nodes, see ccp(1m) provided by Distributed Systems Administration Utilities. To use this command, the local user must have the root access role on each of the involved nodes. For more information on Serviceguard access control policies, see the manual, Managing Serviceguard. Paths may be relative to the current working directory or specified absolutely. The current working directory on a remote node is assumed to be the same as the local node's directory. Copies between two remote hosts are permitted. If a file or directory already exists on the destination node, the destination node's copy will be overwritten with no prompting. The cmcp command is not suited for large files or large numbers of files and may result in a heavy load on the command and Serviceguard daemons. Other tools such as ccp should be considered for these purposes. Options And Arguments -r Recursively copy entire directories. -v Verbose output will be displayed. src_node Serviceguard node to retrieve the file from. Defaults to the local node. src_file Path to source file on src_node. dest_node Serviceguard node to copy file to. Defaults to the local node. dest_file Path to copy src_file to on the dest_node. RETURN VALUE
cmcp returns the following values: 0 Successful completion. 1 Command failed. EXAMPLES
Copy the local file /etc/hosts to remote node node1 cmcp /etc/hosts node1:/etc/hosts Copy the remote file /etc/passwd on node1 locally cmcp node1:/etc/passwd /tmp/passwd.poe Copy a local script directory to a remote node cmcp -r /etc/cmcluster/scripts node1:/etc/cmcluster AUTHOR
cmcp was developed by HP. SEE ALSO
rcp(1), scp(1), ccp(1m), cmsync(1m), cmexec(1m), cmdo(1m), cmquerycl(1m), cmviewcl(1m) Requires Optional Serviceguard Software cmcp(1m)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy