[gradsusr] How to use superscript & subscript in a shell script

Pankaj Kumar pankaj.kumar at zmaw.de
Thu Mar 31 06:13:21 EDT 2011


  Hi John

Thanks for the quick and sharp reply. It has worked.

With best,
Pankaj


On 03/30/2011 05:30 PM, Huddleston, John wrote:
>
> Kumar
>
> A backquote in a shell (K-shell) script tells the shell to execute the 
> exclosed characters as a command.
>
> In your example the shell script will try to execute a command bRef2 
> and a command bRBS2.
>
> In the shell script, you can 'escape' the functionality of the 
> backquote using the backslash character.
>
> echo "draw title Precip diff \(mm/d\), Model\`bRef2\`n -- 
> Model\`bRBS2\`n"
>
> Note the escape for the parenthesis since that is also a special 
> character.
>
> Similarly, you can use the single quote to encase your original 
> expression without using backquotes;
>
> however, script variables ${var} are not interpreted in single quotes.
>
> See 
> http://linuxreviews.org/beginner/Bash-Scripting-Introduction-HOWTO/en/x303.html
>
> John
>
> *From:* gradsusr-bounces at gradsusr.org 
> [mailto:gradsusr-bounces at gradsusr.org] *On Behalf Of *Pankaj Kumar
> *Sent:* Wednesday, March 30, 2011 8:01 AM
> *To:* GrADS Users Forum
> *Subject:* [gradsusr] How to use superscript & subscript in a shell script
>
> Dear All,
> I want to use  superscript & subscript in my shell script. I am trying 
> this
>
> draw title Precip diff (mm/d), Model`bRef2`n - Model`bRBS2`n
>
> it is should write as below
>
> Precip diff (mm/d), Model_Ref2 - Model_RBS2
>
> But this is not working in my shell script (K-Shell) whereas when I am 
> trying the same in a gs file it is working perfectly....
> Can any one suggest me how to use supper and sub script commands in 
> shell scripts!!!
>
> With thanks and regards,
> Pankaj Kumar
>
> -- 
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110331/8b373200/attachment-0003.html 


More information about the gradsusr mailing list