Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with passing double quoted string to a Korn shell script 1

Status
Not open for further replies.

rogers42

Technical User
Mar 30, 2007
64
CA
Hi Folks,

I need help to pass a double quoted string as parameter to my korn shell script.

The shell script is as follows
=========================================

#!/bin/ksh
# File Name: test.ksh

received=$0
echo $received

========================================

Execution:

logmsg="This is a test"
test.ksh $logmsg

Results:
This

Is there any way I can store the entire string in a variable?

Thanks in advance

rogers
 
yes, like so:

[tt]test.ksh "$logmsg"[/tt]


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top