Thread: unix and scripting

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

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, 08:44 PM
  4. AIX unix system script (need help)
    By Liam Battle in forum Linux Programming
    Replies: 4
    Last Post: 02-10-2002, 05:34 PM