Author Topic: arguments  (Read 339 times)

Rick Smith

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 54
  • Karma: +3/-0
    • View Profile
arguments
« 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





Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 215
  • Posts: 3034
  • Karma: +46/-0
    • View Profile
Re: arguments
« Reply #1 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.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 215
  • Posts: 3034
  • Karma: +46/-0
    • View Profile
Re: arguments
« Reply #2 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.
« Last Edit: February 21, 2021, 09:30:35 am by Dave Yeo »