OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Rick Smith on February 21, 2021, 06:17:03 am

Title: arguments
Post by: Rick Smith on February 21, 2021, 06:17:03 am
Greetings,

Chugging along with my arca setup I have run into another stumble...

On my linux boxes I run a bp (bink poll command) that simply looks like;

echo $1
/usr/local/sbin/binkd -p -P$1 ~/etc/config/binkd.cfg

The $1 being a fido address

so if I were type bp 1:105/10 it would poll that address using the above path to config file etc

So I corrected the path (/ to \) for os2 but it doesnt seem to like the argument $1?

Is there a different way I could do this in os2?

Rick




Title: Re: arguments
Post by: Dave Yeo on February 21, 2021, 06:48:57 am
Try running it under sh. Open a cmd prompt and enter sh to get a sh shell, we also seem to have bash now, so could try entering bash.
Note that command completion and history aren't implemented with sh, which is actually dash.
You could also make a script, poll.sh or such and try running "sh poll.sh". Could get more fancy if that works and make a cmd script starting with extproc sh.exe, see the command reference.
Title: Re: arguments
Post by: Dave Yeo on February 21, 2021, 09:28:52 am
Using cmd, something like,
Code: [Select]
\usr\local\sbin\binkd -p -P%1 %HOME%\etc\config\binkd.cfg

inside a cmd file might work if called as "bp 1:105/10" assuming the cmd file is named bp.cmd. Possibly the : might need escaping.
Completely untested. 4OS2 is more powerful as well and might be worth checking out.