Results 1 to 2 of 2
im having trouble with a writing a script in my red hat linux class...could anyone help?
Create a short executable bash script named ~/bin/ispython, which expects a single argument, which ...
- 06-23-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 1
script trouble
im having trouble with a writing a script in my red hat linux class...could anyone help?
Create a short executable bash script named ~/bin/ispython, which expects a single argument, which is a filename. If the supplied filename's first line is exactly "#!/usr/bin/python" (nothing more, nothing less), the script should print the number 1. Otherwise, the script should print the number 0.
I know i have to use the head and grep commands
please help
- 06-23-2008 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Bash Scripting
Forum Rules
4. No homework questions


Reply With Quote