LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2007, 11:59 AM   #1
HOCKEYDAD
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
Export error


Hi,

Let me start by saying I am a complete noob to Linux. I am trying to run a shell script which USED to run under Unix. I have everything commented out except "cd /cloverleaf/qdx5.4.1/integrator". I know this exists because I can get to it on the command line. When I execute the script I get:

: No such file or directory: line 25: cd: /cloverleaf/qdx5.4.1/integrator

The vendor hasn't been much help. They told me I needed to set and enviroment variable and sent me the following to place in my script.

/usr/bin/ksh -c `export QUOVADX_INSTALL_DIR=/cloverleaf/qdx5.4.1/integrator/sbin/hcisetenv -root ksh /cloverleaf/qdx5.4.1/integrator` imphp

When I run this in the script I get:

./CERNER_USAGE_PROCESS_TEST: line 1: export: `-root': not a valid identifier
./CERNER_USAGE_PROCESS_TEST: line 1: export: `/cloverleaf/qdx5.4.1/integrator': not a valid identifier
: not foundh: imphp


Any help would be appreciated,

Tim
 
Old 10-19-2007, 05:12 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
It would help to see the script. If it is a Korn shell (ksh) script, those with the knowledge of ksh could help. If is a Unix Bourne shell (sh), folks with knowledge of sh/bash scripting could help.
 
Old 10-22-2007, 06:57 AM   #3
HOCKEYDAD
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
There is a link from ksh to bash and I can get to it from the command line, however when the first line executes, I get:

-bash-2.05b$ ./CERNER_USAGE_PROCESS_TEST
: bad interpreter: No such file or directory/ksh


Here's the script. Most of it has been commented out, but I can't even get past the #!/usr/bin/ksh

#! /usr/bin/ksh
#********************************
# CERNER_USAGE_PROCESS_TEST
#
# Created by : Tim Hallbauer
# Date: 02/02/06
# Modified:
#
#********************************
#
#********************
# Stop the thread *
#********************
#setroot
#setsite smc_development
#
#hcicmd -p surginet_usage -c 'CER_LAW_USAGE pstop'
#
#/usr/bin/ksh -c `export QUOVADX_INSTALL_DIR=/cloverleaf/qdx5.4.1/integrator/sbin/hcisetenv -root ksh /cloverleaf/qdx5.4.1/integrator` imphp
#
#***************************************
# Change to the directory the file is *
# in and fix it. (remove the extra \n) *
#***************************************
#
cd /cloverleaf/qdx5.4.1/integrator
#
#tr -d '\015' < CERNER_USAGE_TEMP > FFINVTRANSWK
#
#*************************************************
# Change to the directory where we want the file *
# to reside on Lawson and begin the FTP process *
#*************************************************
#
#ftp -n -i << EOP
# open IP
# user name pwd
# cd /law8B/apps/test/hht
# type binary
# put FFINVTRANSWK
# site chmod 777 FFINVTRANSWK
#quit
#EOP
#
#**********************
# Backup and delete *
#**********************
#
#cp FFINVTRANSWK FFINVTRANSWK_BKP
#cp CERNER_USAGE_TEMP CERNER_USAGE_TEMP_BKP
#rm CERNER_USAGE_TEMP
#
#*********************
# Start CER_LAW_USAGE *
#*********************
#hcicmd -p surginet_usage -c 'CER_LAW_USAGE pstart'
#

Last edited by HOCKEYDAD; 10-22-2007 at 10:08 AM.
 
Old 10-22-2007, 10:11 AM   #4
HOCKEYDAD
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Got it figured out after some digging. I found a similar post and thought about how the script was created. It was copied and pasted from a text editor which caused the code to have carriage returns at the end of each line. I re-keyed the script in vi and now it runs just like it used to.

Thanks for helping.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
What does export do in Makefile? vipulc Linux - General 1 06-20-2006 08:37 AM
Export NFS Frunktz Linux - Networking 5 02-20-2006 09:34 PM
can not export shares leupi Linux - Networking 1 01-15-2006 07:07 PM
export variables alaios Linux - General 3 12-04-2004 07:33 AM
export variables radnix Linux - General 2 04-28-2004 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration