Jul 8, 2013, 12:50 PM
Executing linux command in a perl script
I'm a beginner and I have to write a script that extract data from a website.
The data structure is the following:
region > river > station > date > 01.07.2013.csv
region, river, station, date are directories and 01.07.2013 is a file containing informations
the problem is,
a station has the name : ELBE+(ARTLENBURG)
and when my script executes this command : `bash -c 'ls -r $s'`
$s is a variable containing the path of the directory having the name of this region:
I get the following error:
bash: -c: line 0: `ls -r ./pegel/ELBEGEBIET/ELBESEITENKANAL/ELBE+(ARTLENBURG)'
bash: -c: line 0: syntax error near unexpected token `('
you can find the script I wrote as attachment.
and If you have any critics, or you see that I made some errors please tell me how to correct them
I really need your help :(
I have no idea how to fix this error, and I have to fix it as soon as possible.
Thank you very much, and I m sorry for the spelling errors I don't speak english very well
(This post was edited by yosr on Jul 8, 2013, 2:13 PM)