Simple bash question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I am calling a bash script and passing in somestring that includes a "$"

myscript   "$plusmore"

I want to assign in the myscript the $1 arg to something like
MYTEXT="$1"

when I do that I dont get what I'm expecting. if I do
MYTEXT='$1'
I still dont get what I'm expecting.

On the first assignment of MYTEXT I do not want the "$" to be treated as a
shell variable. I cannot find out how to do that.

I do not have the option of escaping the call to myscipt "\$plusmore". I
cannot do that.

What am I missing.

Jerry
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux