Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I have this problem where message is passed over to unix as variables after the script for the script to process using shift command. Problem is some variables are too long and it seems to truncate the closing double quote (").
eg
/usr/local/testscript 11.81.8.3 N/A ServiceCenter TWS tec WR123445 Application
s "Open Systems" batch C342QLW CF04289AAAAAAADI CRITICAL "Oct 16 17:52:22 2004" "Job CF04289AAAAAAADI.CRMSQLW failed, continuing with schedAny one can suggest how to terminate with the double(") as it seems like it has reached the maximum key entry allowed ? (Shortening of the message is not accepted as the message can be even longer than this eg.)
Would appreciate if some one can show me there is another way of passing variable other than this.
Thanks

I put your string into a data file I called junk.data. I then wrote a short ksh script called junk.ksh as follows:
#!/bin/ksh
for value in $*
do
print $1
shift
doneI then ran this command:
./junk.sh $(cat junk.data)
My output looked like this:
11.81.8.3
N/A
ServiceCenter
TWS
tec
WR123445
Applications
"Open
Systems"
batch
C342QLW
CF04289AAAAAAADI
CRITICAL
"Oct
16
17:52:22
2004"
"Job
CF04289AAAAAAADI.CRMSQLW
failed,
continuing
with
sched"Not sure where you wanted the terminating " so I put it at the end of the string. Anyway, this script shows that your entire string is being read. Need a little more detail and perhaps someone can figure out your problem.

![]() |
ls command
|
Shell script to create l...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |