- Jun
- 98
- 0
Greetings. I'm new on this forum, but I'm using 4DOS/4NT/TCC since ... about 17 years :)
Using TCC LE 13.06.77, both 32-bit and 64-bit, Unix/Linux-style paths: off
As far I know, processing of batches and aliases is nearly the same, aliases are de facto simple batches.
Case 1:
Let's define test.btm, containing
@echo off
echo %1 _ %2 _ %3
Let's define an alias:
alias #!=test.btm
And let's check:
#!/usr/bin/sh test.sh
The result is:
/usr/bin/sh _ test.sh _
Great! Works fine, works as expected
Case 2:
To simplify, lets create an alias:
alias #!=`echo %1 _ %2 _ %3`
and check (same, as previous)
#!/usr/bin/sh test.sh
The result is unexpected
/usr _ /bin _ /sh test.sh
Summary:
.BTM receives 2 params
Why alias receives 3 params (slash is treated as an separator)?
Regards.
The best regards.
Using TCC LE 13.06.77, both 32-bit and 64-bit, Unix/Linux-style paths: off
As far I know, processing of batches and aliases is nearly the same, aliases are de facto simple batches.
Case 1:
Let's define test.btm, containing
@echo off
echo %1 _ %2 _ %3
Let's define an alias:
alias #!=test.btm
And let's check:
#!/usr/bin/sh test.sh
The result is:
/usr/bin/sh _ test.sh _
Great! Works fine, works as expected
Case 2:
To simplify, lets create an alias:
alias #!=`echo %1 _ %2 _ %3`
and check (same, as previous)
#!/usr/bin/sh test.sh
The result is unexpected
/usr _ /bin _ /sh test.sh
Summary:
.BTM receives 2 params
Why alias receives 3 params (slash is treated as an separator)?
Regards.
The best regards.