05-30-2009
m4 problem
#!/usr/bin/m4
when running m4 scripts with "#!/usr/bin/m4" they are executed properly, but "#!/usr/bin/m4" is printed out - how to avoid it?
Thanks in advance.
Last edited by Action; 05-30-2009 at 01:17 PM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a developer that is trying to start a script with sh "scriptname". In the script, he is specifying #!/usr/bin/ksh as the command interpreter. For some reason sh is ignoring the #!/usr/bin/ksh. We are running Solaris 8. Does anyone have any ideas what could be causing this? Here... (3 Replies)
Discussion started by: ckeith79
3 Replies
2. Programming
While trying out my hand at writing an interpreter, I was wondering about a a few issues one of which is the following: When I run a command such as jobs in the shell, I get a list of all the background jobs that are running... But if I need my interpreter to run that command, how would I be doing... (34 Replies)
Discussion started by: Legend986
34 Replies
3. UNIX for Dummies Questions & Answers
if somebody can help me pls.
i need the source code for a shell which compiles C or java programs.
i need a very short and simple one, just for the compiling part, in UNIX
Respect (4 Replies)
Discussion started by: zlatan005
4 Replies
4. Shell Programming and Scripting
What would be the best way or method to determine or test for the shell interpreter at the beginning of a script in the event one shell is not available?
If I use the following:
#!/bin/bash
and /bin/bash is not available, then use I'd like to use /bin/ksh if it is available.
#!/bin/ksh (8 Replies)
Discussion started by: nck
8 Replies
5. Shell Programming and Scripting
Hi Gurus,
I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as
#!/usr/bin/expect-5.43 -f
spawn telnet localhost 2233
expect "password:"
send "secret\r"
send "i data.cnbc.com\r"
send "exit\r"
expect eof
When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies
6. Programming
Hello guys - do you have any sample program implementing UNIX commands in an interpreter with Java? I can look up the simple ones such "ls" etc and then write my own commands.
I would appreciate it. (2 Replies)
Discussion started by: cmontr
2 Replies
7. Shell Programming and Scripting
Hi All,
I'm not confortable in writing script, can someone can help me, when I run that script below i found this error code : -bash: ./script.sh: /bin/sh.: bad interpreter:
Here is the script
for i in *
x=${i##*.}
z=$(perl -e 'print time;')
t=$(echo $z-$x|bc)... (12 Replies)
Discussion started by: bzb23
12 Replies
8. Shell Programming and Scripting
Hi. My name is Caleb (a.k.a RagingNinja) form the whited00r forums. (Whited00r makes custom firmware for iOS devices).
I have been learning and creating simple shells scripts. I have been recently using VIM for Windows or using VirtualBox to run the UBUNTU OS within VirtualBox to create my shell... (2 Replies)
Discussion started by: RagingNinja
2 Replies
9. Linux
Can you explain me what is ment by interpreter files ??
Why and how they are used?? (1 Reply)
Discussion started by: kkalyan
1 Replies
LEARN ABOUT OPENSOLARIS
setusershell
getusershell(3C) Standard C Library Functions getusershell(3C)
NAME
getusershell, setusershell, endusershell - get legal user shells
SYNOPSIS
#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);
DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If
/etc/shells does not exist, the following locations of the standard system shells are used in its place:
/bin/bash /bin/csh
/bin/jsh /bin/ksh
/bin/ksh93 /bin/pfcsh
/bin/pfksh /bin/pfsh
/bin/sh /bin/tcsh
/bin/zsh /sbin/jsh
/sbin/pfsh /sbin/sh
/usr/bin/bash /usr/bin/csh
/usr/bin/jsh /usr/bin/ksh
/usr/bin/ksh93 /usr/bin/pfcsh
/usr/bin/pfksh /usr/bin/pfsh
/usr/bin/sh /usr/bin/tcsh
/usr/bin/zsh /usr/sfw/bin/zsh
/usr/xpg4/bin/sh
The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells.
The setusershell() function rewinds the file or the list.
The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells.
RETURN VALUES
The getusershell() function returns a null pointer on EOF.
BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved.
NOTES
Restricted shells should not be listed in /etc/shells.
SunOS 5.11 1 Nov 2007 getusershell(3C)