ShellUsing the Bash Shell137The shell uses a blank (Web hosting resellers)
ShellUsing the Bash Shell137The shell uses a blank space or tab to distinguish between the command andoptions. Naturally, you help it by using a space or a tab to separate the com- mand from the options and the options from one another. An option can contains spaces all you have to do is put that option insidequotation marks so the spaces are included. For example, to search for myname in the password file, I enter the following grepcommand (grepis usedfor searching for text in files): grep Naba Barkakati /etc/passwdWhen grepprints the line with my name, it looks like this: naba:x:500:500:Naba Barkakati:/home/naba:/bin/bashIf you created a user account with your username, type the grepcommandwith your username as an argument. In the output from thegrepcommand, you can see the name of the shell(/bin/bash) following the last colon (:). The number of command-line options and their format, of course, dependson the actual command. Typically, these options look like -X, where Xis asingle character. For example, the lscommand lists the contents of a direc- tory. You can use the -loption to see more details, such as this: [ashley@dhcppc4 ashley]$ ls -ltotal 8drwxrwxr-x 2 ashley ashley 4096 Jun 29 13:35 Directorydrwx—— 7 ashley ashley 4096 Jun 29 11:44 MailThe [ashley@dhcppc4 ashley]$part is the shell prompt for the usernamed ashley. On your system, the prompt depends on your username. When showing examples, I omit the prompt. If a command is too long to fit on a single line, type a backslash followed byEnter. Then, continue typing the command on the next line. For example, type the following command (press Enter after each line): cat /etc/passwdThe catcommand then displays the contents of the /etc/passwdfile. You can concatenate several shorter commands on a single line. Just sepa- rate the commands by semicolons (;). For example, the following commandcd; ls -l; pwd
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.