Results 1 to 5 of 5

Thread: Shell Scripting in Linux Workshop

  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Shell Scripting in Linux Workshop

    I am here to know more about the Shell Scripting that is used in Linux Workshop. I have tried to search information about it on web, but there was nothing related to it. Lastly, I remembered of you members, and then I have posted here. Now I am willingly to know some information about the Linux Workshop. I am sure that you members will provide some help for me.

  2. #2
    Join Date
    Jan 2009
    Posts
    120

    Re: Shell Scripting in Linux Workshop

    For Linux to interact with the system is often via the shell csh, ksh, sh, or bash pdsh. Who are the right commands and the syntax but not controlled, desperately fast. For system administrators, the Shell Scripting in Linux quickly facilitating work. If familiar with the basic operation and the policies of the Bash, so can easily automate processes. Nor can it on the command line a lot more done than is possible with the usual graphical admin tools. In a total of three articles of the shell scripting, we deal with everyday machinations of the system administrator to interact with the Bourne shell (sh) and its successor, Bourne-Again Shell (bash). In the first Linux-Workshop Shell Scripting - automate processes is about the basic functionality of the shell. In this article we deal with the admin life on the shell scripting and show typical examples.

  3. #3
    Join Date
    Apr 2009
    Posts
    69

    Re: Shell Scripting in Linux Workshop

    Occasionally we get the following message when it comes to a large number of files to search or log files to delete:
    > Ls *. gz
    -Bash: / bin / ls: Argument list too long
    The one process given number of arguments has been exceeded. If "noglob is disabled in the shell (default, set + f; display: set-o), then the expression" *. gz" expanded so that all files ending with the current "gz". folder is located, and the command "ls" is passed as an argument list. Physically, the shell will therefore call "ls file1.gz file2.gz fileN.gz .." if these files are present.

  4. #4
    Join Date
    Apr 2009
    Posts
    89

    Re: Shell Scripting in Linux Workshop

    The Command Output (stdout) can be more easily processed by these variables are assigned a shell (command substitution). Subsequent line breaks are removed. This has the bash of the classic quotes-to-left (backquote) md = `date` version and md = $ (date). Means "set $ md" we can imagine the space-separated values in n make available the positional parameters $ 1, $ 2, .. $.
    Md = `date`; md set $ echo $ 4
    14:30:28
    In a nesting the inner stock quotes with the Bash escape character '\' are to mask:
    Code:
    > Set-x 
    > Echo `set - \` date \ `echo $ 4` 
    + + + Date 
    + + Set - Wed Dec 8 11:40:31 CET 2010 
    + + Echo 11:40:31 
    + Echo 11:40:31 
    11:40:31
    An optimized version of "$ (cat file)", previously in the command is still listed in the "cat", offers the bash "$ (<file)".

  5. #5
    Join Date
    Feb 2009
    Posts
    45

    Re: Shell Scripting in Linux Workshop

    A quick change to a different directory and leave with "pushd" and "popd" practice:
    Code:
    > Pwd 
    / Home / thomas / tmp 
    > Pushd / var / spool / cron 
    / Var / spool / cron ~ / tmp 
    > Dirs 
    / Var / spool / cron ~ / tmp 
    > Pushd / bin 
    / Bin / var / spool / cron ~ / tmp 
    > Popd; popd 
    ~ / Tmp 
    > Popd 
    bash: popd: directory stack empty
    If you want a longer chain of command to type often, can simplify this with the alias feature of the shell. An alias is valid only interactively, that is, in a script function is to be used. The following command shows the currently defined aliases:
    > Alias This defines an alias Come Ande "myf"
    Myf alias = "find.-Type f-size +1 M-ls 2> / dev / null"

Similar Threads

  1. How can I run a GUI app from su shell in Linux Mint?
    By Gopooo in forum Operating Systems
    Replies: 6
    Last Post: 18-11-2011, 02:19 PM
  2. Alternative for Linux Mint 12 and a Gnome Shell
    By Souman in forum Operating Systems
    Replies: 8
    Last Post: 12-11-2011, 12:56 AM
  3. Why to use Shell in place of GUI Mode on Linux
    By Jezriah in forum Tips & Tweaks
    Replies: 3
    Last Post: 31-12-2010, 07:55 AM
  4. Problem of shell script on Linux
    By $tatic in forum Software Development
    Replies: 4
    Last Post: 16-04-2009, 09:08 PM
  5. Need suggestion on book for Unix & shell scripting!
    By SamsherR in forum Software Development
    Replies: 2
    Last Post: 11-02-2009, 05:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,193,259.41108 seconds with 17 queries