Passing on script generated arguments to erl
david wallin
david.wallin@REDACTED
Mon Jul 5 14:34:45 CEST 2004
Hi all,
I've run into a problem when using erl with a bash script that
generates the arguments I want to use in erlang.
If I type something like this at the bash prompt everything works fine:
[dolly:~/southpaw] david% erl -- 'foo 1' 'foo 2'
Erlang (BEAM) emulator version 5.3 [source]
Eshell V5.3 (abort with ^G)
1> init:get_plain_arguments().
["foo 1","foo 2"]
If I try the script that automatically generates the arguments (just
assume that the WORKLOAD var is generated by a script):
[dolly:~/southpaw] david% WORKLOAD="'foo 1' 'foo 2'"
[dolly:~/southpaw] david% echo $WORKLOAD
'foo 1' 'foo 2'
[dolly:~/southpaw] david% erl -- $WORKLOAD
Erlang (BEAM) emulator version 5.3 [source]
Eshell V5.3 (abort with ^G)
1> init:get_plain_arguments().
["'foo","1'","'foo","2'"]
Can anybody give me some advice on the matter, I'm currently leaning
towards creating a temp file containing the arguments but the solution
doesn't appeal to me.
cheers,
--david.
More information about the erlang-questions
mailing list