| Linux Guru
Join Date: Oct 2001 Location: Täby, Sweden
Posts: 7,578
| First of all, you should not type them in directly on the shell. You should store it into a file, which you then make executable by running (on the shell) "chmod 755 <filename>" (where <filename> is supposed to be whatever you named the file). That kind of file is called a script, since it contains a sequence of commands to be executed by a program. The first line, #!/bin/sh specifies the program (/bin/sh, ie. the shell) to execute the file, which mean that this script is a shell script, since the shell interprets it. It's somewhat like a .BAT file in MS-DOS, except that shell scripts are much, much more capable.
You are right, the $ indicates that you are a regular user. # indicates that you're root. If you don't want to actually log in as root, which you shouldn't do, you can become root by running "su -". su stands for superuser, which is a common way of saying root.
The "|" is called the pipe character, since it (in the shell, that is) pipes the output of one command to the input of another. For example, in this script, the line "lspci | grep "US Robotics" | awk '{print $1}'" runs lspci, which lists the PCI devices in your system, pipes that output to grep, which only prints the line(s) that contains the string "US Robotics", and pipes the output of grep to awk, which, with the '{print $1}' argument, prints the first column in its input lines. So, all in all it finds the device number (which is the first column in the lspci output) of your US Robotics modem. Actually, the grep and awk commands are much more advanced then what I described here, but I'll spare you that for now.
I suppose you don't have an american keyboard, since you don't know how to type it. Since I don't what keyboard you use, I cannot tell you which key it is on, but on my Swedish keyboard, on which I still use an american layout, since I find it far superior, I get it by holding Shift and typing the button which says ' and *. It is possible, of course, to switch keyboard layout, but it uses different commands depending on whether you use it in X or on the console, so I won't go through that now.
By the way, if someone ever says that you can look at something like pppd(8) or fstab(5), and you don't know what it means (since you claim to be new to linux), it means a manual page. Just start a terminal and type "man 8 pppd" (for pppd(8)) or "man 5 fstab" (for fstab(5)), and you'll get some documentation on that subject. Almost everything in unix is documented pretty thoroughly in the manpages.
For example, see sh(1), for more info on the pipe character and the rest of the shell. |