• Skip to main content
  • Skip to primary sidebar
  • Advertise

Computer Tips And Tricks, Gadgets, How-To, Life - 2.0 Style

Get latest technology updates and computer tips and tricks.

Escape Asterisk in Shell script

January 5, 2016 by Gautam

 

You need to quote the variable reference as well:

Ex 1:

me$ FOO=”BAR * BAR”
me$ echo “$FOO”
BAR * BAR

Ex 2:

FOO=”BAR * BAR”
echo “$FOO”

Ex 3:

queryString=”INSERT OVERWRITE LOCAL ‘/usr/local/testTemp/test’ DIRECTORY SELECT * FROM test24 limit 5;”

echo “$queryString”


 

Filed Under: Informal-Explanations

Primary Sidebar

Copyright © 2023 · Magazine Pro on Genesis Framework · WordPress · Log in