how to include "*" in echo command????


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to include "*" in echo command????
# 1  
Old 06-24-2009
how to include "*" in echo command????

Hi All,

I am doing one simple web tool. I have a HTML as my front end and cgi as my backend. Here my pb is when I assign the html form input to a variable in my script, it is not accepting the special char "*" to that varible.

say I have a text box(Name : in_query) in html and trying to assign the value to a variable in my script like below :

input_query=`echo "${FORM_in_query}"`

Here my in_query --> "select * from order_queue;" (Note : I depends on user input)
but after assigning it to input_query variable I am getting as
---> select bvoip_raw_AVOICS_info.sh bvoip_raw_router_configuration.sh docs giom_bknd iom_report_env iom_report_env.prod scripts sql from order_queue

where "bvoip_raw_AVOICS_info.sh bvoip_raw_router_configuration.sh docs giom_bknd iom_report_env iom_report_env.prod scripts sql" are the output of ls command.......


ap5377@::/export/home/ap5377/iomr31/rpt> ls
bvoip_raw_AVOICS_info.sh giom_bknd scripts
bvoip_raw_router_configuration.sh iom_report_env sql
docs iom_report_env.prod
ap5377@::/export/home/ap5377/iomr31/rpt>


I tried with the following options
1) echo "${FORM_input_query}" | read -r PROCESSED_QUERY
2) PROCESSED_QUERY=`print -r "${FORM_input_query}"`
but these two also not working............ Smilie

pls help to resolve this issue........
# 2  
Old 06-24-2009
Code:
#!/bin/ksh

a="select * from  ${USER}"
echo "${a}"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

2. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

3. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

4. Shell Programming and Scripting

mv command to include files beginning with "." (like .htaccess)

Hi, how can I get the mv command to include files beginning with . (such as .htaccess)? Right now when I mv a directory the .htaccess file is missing and I need to do this on a lot of directories, so there's a lot of wordpress permalinks that don't work anymore because the .htaccess file wasn't... (5 Replies)
Discussion started by: vanessafan99
5 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

With that logic this echoes "echo". Question about echo!

echo `echo ` doesn't echoes anything. And it's logic. But echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo" (too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies

7. UNIX for Dummies Questions & Answers

Format output from "echo" command

Hi, I have written a BASH shell script that contains a lot of "echo" commands to notify the user about what's going on. The script generates a log file that contains a copy of what is seen in the terminal. The echo statements are generally verbose, and thus extend out for quite a ways on one... (2 Replies)
Discussion started by: msb65
2 Replies

8. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

9. Shell Programming and Scripting

Need a Command To display "echo command value in loop" in single line.

Hi I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below. Input file :test_1.txt a1|b1|4|5 a1|b1|42|9 a2|b2|32|25 a1|b1|2|5 a3|b3|4|8 a2|b2|14|6 Output file:test_2.txt... (2 Replies)
Discussion started by: sakthifire
2 Replies

10. UNIX for Dummies Questions & Answers

help with "echo" command

I was wondering how i could integrate the "echo" command into a java program. Here is my code: String boxname=""; String box = new CmdExec().run("ksh \"echo $__box_name\""); boxname = (box); System.out.println("BoxName2:"+boxname+"\n"); Here is the... (5 Replies)
Discussion started by: lachino8
5 Replies
Login or Register to Ask a Question