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
mounted.ocfs2(8)						OCFS2 Manual Pages						  mounted.ocfs2(8)

NAME
mounted.ocfs2 - Detects all OCFS2 volumes on a system. SYNOPSIS
mounted.ocfs2 [-d] [-f] [device] DESCRIPTION
mounted.ocfs2 is used to detect OCFS2 volume(s) on a system. This tool assumes that the nodes detected on the system are part of the same cluster as the one specified in /etc/ocfs2/cluster.conf. OPTIONS
-d Lists the OCFS2 volumes along with their labels and uuids. If a device is not specified, it scans all the devices in /proc/parti- tions. -f Lists the OCFS2 volumes along with the list of nodes that have mounted the volume. The node names are listed if the O2CB cluster is online. Note: As this information is gathered using dirty-read, the information may be stale. EXAMPLES
[root@node1 ~]# mounted.ocfs2 -d Device FS Stack UUID Label /dev/sdb1 ocfs2 local 2D1C9636FE38462DB43A75D1DA592207 vmvol /dev/sdj1 ocfs2 o2cb FF2E239B02D941FEAF25BDAE8DD553B9 dbstore [root@node1 ~]# mounted.ocfs2 -f Device FS Nodes /dev/sdb1 ocfs2 node15, node1 SEE ALSO
mkfs.ocfs2(8) fsck.ocfs2(8) tunefs.ocfs2(8) debugfs.ocfs2(8) ocfs2console(8) o2cb(7) AUTHORS
Oracle Corporation COPYRIGHT
Copyright (C) 2004, 2010 Oracle. All rights reserved. Version 1.6.4 September 2010 mounted.ocfs2(8)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy