Thread: shell script

  1. #1
    Registered User
    Join Date
    Sep 2002

    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
    shift ${1}
    echo ${1}
    ... and with a script called ss, it looks like this:
    $ ss 3 this is a test line
    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, 11: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, 02:20 PM