tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Jim R Jones <Jim_R_Jones () notesbridge ! cummins ! com>
To: tru64-unix-managers
Subject: Summary : Basic korn shell question
Date: Mon, 12 Apr 1999 20:33:28 +0000	[thread overview]
Message-ID: <96079040315629.tru64-unix-managers.marc@archive.invalid> (raw)



Thanks to all who replied.  I recieved replies from numerous people with
suggestions and hints.   The real answer is use the print command with a -
when printing out values instead of just the plan print command or the echo
command to display values.

the test program
./testj 3 -4 5
#!/bin/ksh
print - $1
print - $2
print - $3

or you can do it with the echo command.  The program would look as follows:

#!/bin/ksh
echo $1
echo $2
echo $3

This however gives the bad option error

./testb 3 -4 5
print $1
print $2
print $3

When it gets to the print $2 command it prints out the following error:
testj [3]: print: bad options(s)

To solve the problem with the print command just use the print - command
which is the same as the echo command in the korn shell.

Again thanks all that replied.

Jim Jones

                 reply	other threads:[~1999-04-12 20:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox