Welcome, Guest. Please login or register.

Author Topic: question about PIPE and _mchar  (Read 1307 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

question about PIPE and _mchar
« on: October 15, 2005, 03:35:39 PM »
Well, question about PIPEs in amiga. I am using PIPE-1.5 from aminet, and all work fine, but, here is a settings:

Set _pchar "|"   ; PIPE
Set _mchar "||"  ; multicommand

Well, here is || as ';' in unix. Well, i was try to put Set _mchar ";", and it is not work, becouse aos already handled ';' char ? So, for what purposes aos take it, and , can it be to alises || to ; anyway ?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: question about PIPE and _mchar
« Reply #1 on: October 15, 2005, 04:14:29 PM »
You can't use ';', it's the comment char (rest of the line is ignored).

Personally I use _mchar of "&&".
 

Offline kas1eTopic starter

Re: question about PIPE and _mchar
« Reply #2 on: October 15, 2005, 04:22:35 PM »
It is comment in shell window too ?[  ] I mean:

amiga shell:> cd libs: ; for what purposes needs comments in the command string ?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: question about PIPE and _mchar
« Reply #3 on: October 15, 2005, 04:38:57 PM »
Code: [Select]
echo yes ; this is a comment you can't see
 

Offline kas1eTopic starter

Re: question about PIPE and _mchar
« Reply #4 on: October 15, 2005, 07:57:34 PM »
I mean why need it comments in command string in shell ? Do you use it for any reassons ?:)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: question about PIPE and _mchar
« Reply #5 on: October 15, 2005, 08:16:50 PM »
Comments are optional. Usually they're used in scripts to explain function of the script.

Functionally
Code: [Select]
echo comments are optional ; they really are
does exactly the same as:
Code: [Select]
echo comments are optional
 

Offline Thomas

Re: question about PIPE and _mchar
« Reply #6 on: October 15, 2005, 09:27:12 PM »
Quote

kas1e wrote:
I mean why need it comments in command string in shell ? Do you use it for any reassons ?:)


It's the same code which interprets a command line, no matter if it is in a script or a window. So if you want to use comments in a script you also have to live with them in a window. Of course nobody enters comments in a shell window.

Bye,
Thomas