shell script

This is a discussion on shell script within the Tech Board forums, part of the Community Boards category; how do i write a csh script, that uses its first argument (a number) to specify which one of its ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    31

    Question shell script

    how do i write a csh script, that uses its first argument (a number) to specify which one of its remaining arguments to echo?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Code:
    shift ${1}
    echo ${1}
    ... and with a script called ss, it looks like this:
    Code:
    $ ss 3 this is a test line
    a
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. shell script basic question
    By PedroTuga in forum Linux Programming
    Replies: 1
    Last Post: 09-09-2006, 03:24 AM
  2. invoking shell script
    By agoel01 in forum C Programming
    Replies: 1
    Last Post: 12-01-2005, 10:37 AM
  3. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 01:47 PM
  4. Running 'exec' twice in one UNIX shell script
    By Zughiaq in forum Tech Board
    Replies: 2
    Last Post: 05-03-2003, 12:04 AM
  5. Arguements with a shell script
    By Doh in forum Linux Programming
    Replies: 1
    Last Post: 11-28-2002, 01:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21