freeos.com— This tutorial is designed for beginners who wish to learn the basics of shell scripting/programming plus introduction to power tools such as awk, sed, etc. It is not help or manual for the shell.
Jan 23, 2007View in Crawl 4
There's no better way to teaching _computing_, rather than vendor-specific GUI's, than the command-line. People get the notion of a process, of input and output, and the way the different components of the PC interacts. This helps troubleshooting. I can recall the days of DOS when people were encouraged to communicate with computers in a level that inspired some thinking and gave the user great 'expressiveness'. Those days may return to the mainstream, in the form of Monad.
These shell scripts have no extension. How does the system know it is a shell script and not a binary. Also how does the system treat the executable bit set/cleared on data files?Then there's the shell scripts that have#!/bin/shor something similar. How does that work? There seem to be some examples that have that sort of line at the beginning and some that don't. What's the difference?
..i think when you try to run a text file without specifying what program to use( like python myprogram ), the terminal will read the first line of the file to see what program it should use to execute it(it will be something like "#!/usr/bin/env python" for python scripts or "#!/bin/bash" for shell scripts
It's pretty basic, but seems to cover ground quite well.For draft 1 it's OK, but I get the feeling that with the standard of English used, it'd be a complete nightmare for a real beginner to learn from it.If anyone else has the time, someone should offer to proof-read it for the guy.
How else would you keep straight what kind of file is what except for the extension?Also is it the shell that does the first pass of scanning of #! or does it happen at a lower level? Is there an API call to be used by multiple applications that accepts a file with the executable bit set and scans it for the #!, or is it up to each shell to process it themselves?
schestowitzJan 23, 2007
There's no better way to teaching _computing_, rather than vendor-specific GUI's, than the command-line. People get the notion of a process, of input and output, and the way the different components of the PC interacts. This helps troubleshooting. I can recall the days of DOS when people were encouraged to communicate with computers in a level that inspired some thinking and gave the user great 'expressiveness'. Those days may return to the mainstream, in the form of Monad.
hackwrenchJan 24, 2007
These shell scripts have no extension. How does the system know it is a shell script and not a binary. Also how does the system treat the executable bit set/cleared on data files?Then there's the shell scripts that have#!/bin/shor something similar. How does that work? There seem to be some examples that have that sort of line at the beginning and some that don't. What's the difference?
kunduzJan 24, 2007
..i think when you try to run a text file without specifying what program to use( like python myprogram ), the terminal will read the first line of the file to see what program it should use to execute it(it will be something like "#!/usr/bin/env python" for python scripts or "#!/bin/bash" for shell scripts
kleptoJan 24, 2007
That indeed is a better tutorial, thanks statikuz
jspmatrixJan 24, 2007
The cyberciti link was dugg about 10 months ago...
blackadderiiiJan 24, 2007
It's pretty basic, but seems to cover ground quite well.For draft 1 it's OK, but I get the feeling that with the standard of English used, it'd be a complete nightmare for a real beginner to learn from it.If anyone else has the time, someone should offer to proof-read it for the guy.
hackwrenchJan 24, 2007
How else would you keep straight what kind of file is what except for the extension?Also is it the shell that does the first pass of scanning of #! or does it happen at a lower level? Is there an API call to be used by multiple applications that accepts a file with the executable bit set and scans it for the #!, or is it up to each shell to process it themselves?
meteorashJan 30, 2007
lol!