perl - Error fg no job control -
set /p input=options: [r]ead, [w]rite, [m]ixed: if "%input%"=="w" perl ftl_log_read.pl random_read.txt > random_read.dat fi if "%input%"=="r" perl ftl_log_write.pl random_write.txt > random_write.dat fi if "%input%"=="m" perl ftl_log_read.pl random_rw.txt > random_read.dat perl ftl_log_write.pl random_rw.txt > random_write.dat fi
while compiling in linux machine getting "line 3: fg: no job control"
this run.bat file
please me resolve issue
it seems executing windows batch file (.bat) bash shell script. these have incompatible syntax. you need rewrite run.bat
script shell script if want run under linux.
background:
the bash if
statement expects command condition, not comparison expression. "%input%"=="w"
undergo variable expansion, invoked command. string comparison written if [[ "$input" = "w" ]]; ...; fi
. note shell variables $name
whereas batch variables %name%
.
bash features job control. shell can juggle multiple background processes. if run command %foo
expand name of background command beginning foo
, bring command foreground.
however, job control available in interactive sessions, i.e. if use bash interactive command line, not script interpreter. bash therefore reports error message “no job control” , terminates.
Comments
Post a Comment