Can a shell be an "interpreter"?
From: trifon (ivaylo_iliev_at_hotmail.com)
Date: 11/17/03
- Next message: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Previous message: Stephane CHAZELAS: "Re: Need Textmode Commands"
- Next in thread: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Reply: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Reply: Stephane CHAZELAS: "Re: Can a shell be an "interpreter"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Nov 2003 21:59:03 -0800
Sorry if this is trivial, couldn't find anything related.
If I have a script named bctest1:
#! /usr/bin/bc -q
2+2
quit
### bctest1 end ###
and run it, the output is:
$ ./bctest1
4
Instead of
#! /usr/bin/bc
I can have
#! /bin/bash,
#! /bin/octave, etc. whatever "interpreter" specified on the first
line. Is it possible the so called interpreter to be another script?
When I run bctest2 which is:
#! ./shellbc -q
2+2
quit
### bctest2 end ###
where shellbc is just:
### shellbc begin ###
/usr/bin/bc $*
### shellbc end ###
I get:
$ ./bctest2
./bctest2: line 2: 2+2: command not found
./bctest2: line 3: quit: command not found
although otherwise ./shellbc will do everything which /usr/bin/bc
would. There is no problem with the permissions, spelling, etc. I get
the same from all "interpreters" I've tryed, wrap them in another
script and can't execute your file.
Thanks for your help...
- Next message: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Previous message: Stephane CHAZELAS: "Re: Need Textmode Commands"
- Next in thread: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Reply: those who know me have no need of my name: "Re: Can a shell be an "interpreter"?"
- Reply: Stephane CHAZELAS: "Re: Can a shell be an "interpreter"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|