Find the answer to your Linux question:
Results 1 to 3 of 3
how to make this BASH script : 1. i want to Change my current directory to /tmp and Issue a customized welcome message to this directory (using the variables that ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    2

    how to make simple bash script

    how to make this BASH script :

    1. i want to Change my current directory to /tmp and Issue a customized welcome message to this directory (using the variables that contain my username and the name of this directory); e.g. "Welcome george to /tmp" and Lists the contents of this directory

    2.script that will output only the first field of the file /etc/group (using cut command)

    3. script that will output the contents of the file /etc/group in numeric order based on the 3rd field (using sort commands)

    thx for help

  2. #2
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    Doing homework are we?

  3. #3
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    522
    well I know that it should be some thing like this:
    Code:
    #!/bin/sh
    cd /tmp
    echo welcome message + variable name
    A bash script is just running the commands in the script. This is just step one. Step 2 and 3 you need to figure out your self, simply because I don't know how to continue this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...