unix and scripting

This is a discussion on unix and scripting within the Tech Board forums, part of the Community Boards category; say I have a folder main and inside main I have a folder called test 1, a script is in ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    569

    unix and scripting

    say I have a folder main and inside main I have a folder called test 1, a script is in the folder test1 and test1.csh takes a file called x which is in the folder main.. how can I access the script so that it can access x from main without having to copy x inside the directory test1?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,453
    test1.csh ../../x

    And "ewww to csh"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    569
    And "ewww to csh", what do you mean?

  4. #4
    Registered User
    Join Date
    Jan 2008
    Posts
    569
    and do I do this from the folder test1? what if I want to access test1.csh from the folder main? so therefore I don't have to specify where x is

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    C shell is not for everyone, perhaps that's what Salem was getting at

    Tried bash? (http://en.wikipedia.org/wiki/Compari...omputer_shells)

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,453
    Horrid memories and this -> http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
    Yes, sooner or later, csh weirdness will bite you.

    > and do I do this from the folder test1?
    It's all relative
    cd test
    ./test1/test1.csh ../x
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Language - When To Use What?
    By tjinr in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 08-06-2006, 02:04 AM
  2. passwd - Unix
    By jrfbaan in forum Linux Programming
    Replies: 3
    Last Post: 05-04-2005, 03:44 PM
  3. UNIX (Linux, BSD, etc) Programming :: UNIX
    By kuphryn in forum Linux Programming
    Replies: 6
    Last Post: 04-01-2004, 07:44 PM
  4. AIX unix system script (need help)
    By Liam Battle in forum Linux Programming
    Replies: 4
    Last Post: 02-10-2002, 04:34 PM

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