Not showing the correct string...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Not showing the correct string...
# 1  
Old 01-20-2012
Not showing the correct string...

Scripting GURU,
I have written a ksh script to get a number from a file and attempting to input the number into the sendsms output script..

But i am finding that ONCALL_NUMBER is showing as $ONCALL_NUMBER as the output for the TO:$ONCALL_NUMBER@sms.info.com message and not as TO:+44123456789@sms.info.com

Can you help please.


HTML Code:
Script
------
ONCALL_NUMBER=`$SCRIPT/smsnumber`
$SCRIPT/sendsms 'TO:$ONCALL_NUMBER@sms.info.com%FROM:Ateam@info.com%SUBJECT:<The Box is knackered again>'
HTML Code:
Output
------
+ ONCALL_NUMBER=+44123456789
+ sendsms TO:$ONCALL_NUMBER@sms.info.com%FROM:Ateam@info.com%SUBJECT:<The Box is knackered againain>
# 2  
Old 01-20-2012
I believe:
Code:
$SCRIPT/sendsms "TO:$ONCALL_NUMBER@sms.info.com%FROM:Ateam@info.com%SUBJECT:<The Box is knackered again>"

# 3  
Old 01-20-2012
Code:
ONCALL_NUMBER=`$SCRIPT/smsnumber`
$SCRIPT/sendsms "TO:$ONCALL_NUMBER@sms.info.com%FROM:Ateam@info.com%SUBJECT:<The Box is knackered again>"

Jean-Pierre.
# 4  
Old 01-20-2012
Doh!!,. Thanks....Worked fine...

Being silly....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Now showing the correct output

Hello I am working on one script where I am trying to display all the directories which is inside the workspace but somehow it is giving me weird output and this is occurring only with one directory other also having the result.html file inside the directory. for i in `ls -1 | egrep -iv... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

2. Shell Programming and Scripting

Showing error

if ; then rm -rf "${x}"_"${y}"_abc_pqr.dat error: `then' unmatchedCan anyone please help me in correcting it. Please use code tags next time for your code and data. Thanks (2 Replies)
Discussion started by: D_Sethi
2 Replies

3. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

4. Linux

\c showing in ksh

Hi, I am having an issue releated to shell-environment on a server. Let me explain with the example of below script: #!/bin/ksh echo " enter:\c" read a echo $a As I am using ksh the expected output from this script should be 'enter:' (expecting the input for read in same... (8 Replies)
Discussion started by: mystition
8 Replies

5. AIX

5.2 who not showing all login

I have 1 box running 5.2 and another running 5.3. Both use the NIS accounts and NFS home directories. Users can telnet on to both and 'who' displays the login. However when users run xterms using a remote X server (e.g. Exceed), by telnetting then running /usr/bin/X11/xterm -d xxx.xxx.xxx.xxx:0 ... (1 Reply)
Discussion started by: spitzie
1 Replies

6. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

7. Programming

Problem in getting the correct number from the string.

I have string named texts which consist of section label “BOOK-SEC-“. Section starts from 1 to n, where n is a number. For this example conside the value of n is 9. That is, the string variable looks like “BOOK-SEC-1... (2 Replies)
Discussion started by: SamRoj
2 Replies

8. Shell Programming and Scripting

Please correct this

I have input file like this Input file: ABC|abc_etc_passwd XYZ|XYZ_etc_passwd zXY|XYZ_etc_passwd IJK|test_etc_passwd KLM|test_etc_passwd i want to do following in a loop. grep 'ABC' *abc_etc_passwd* grep 'XYZ' *XYZ_etc_passwd* grep 'ZXY' *ZXY_etc_passwd* i have tried this for i... (2 Replies)
Discussion started by: pinnacle
2 Replies

9. AIX

san lv showing old fs

Hi All, I have been working with two AIX with san and this is the first I got this minor problem on my third AIX. The san/hdisk was recreated so many times because of this problem. When I created a new vg and fs. The fs will be mounted/unmounted properly but if I query the fs on a vg with... (2 Replies)
Discussion started by: itik
2 Replies

10. UNIX for Dummies Questions & Answers

ps -ef not showing all info

Hi there, How can I expand the command filed sizing when using a ps command. With diretories and script names and parameters being set I'm not getting some of the information that I need (at the end of the command line). I'm using HP_UX 11i. Cheers, Neil (2 Replies)
Discussion started by: nhatch
2 Replies
Login or Register to Ask a Question