shell - using wget to get excel file -
i'm sorry not speak english well. want use wget
excel file link :
http://app/sip/rkn/export.php?p1=1&p2=613&p3=01&p4=31&p5=01&p6=2013
but i'm getting error message :
'p2' not recognized internal or external command, operable program or batch file. 'p3' not recognized internal or external command, operable program or batch file. 'p4' not recognized internal or external command, operable program or batch file. 'p5' not recognized internal or external command, operable program or batch file. 'p6' not recognized internal or external command, operable program or batch file.
what can solve issue? in advance!
the problem &
character interpreted shell, has special meaning (see here).
try following commands in shell understand does:
$ sleep 2 && echo "2 seconds have passed" $ sleep 2 && echo "2 seconds have passed" &
simplified, syntax runs specified command before &
in background, means string comes after &
interpreted new command shell. try example understand happens:
$ wget foo&ls
to overcome problem, need enclose link in quotes. double quotes (""
) might not sufficient, because string enclosed in double quotes subject e.g. parameter expansion, if link includes looks shell variable (e.g. $foo
) link mangled.
enclose in single quotes instead make sure wget
sees link "as is":
$ wget 'http://app/sip/rkn/export.php?p1=1&p2=613&p3=01&p4=31&p5=01&p6=2013'
Comments
Post a Comment