Results 1 to 2 of 2

Thread: Shell script would not copy my files

  1. #1
    Join Date
    Jan 2009

    Angry Shell script would not copy my files

    Bash refuses to copy my files, I am dumbfounded!


    echo 'Executing for i=1'
    # executing a script that run a large computation and creates an output file myout, the script exe runs fine from the prompt
    echo "Execution complete"
    cp myout myout.1
    cat myout >> myout.all

    # rerun the script
    echo 'Executing for i=2'
    echo "Execution complete"
    cp myout myout.2
    cat myout >> myout.all

    This script never creates myout.1 nor it redirects myout.1 into myout.all. However, it does create myout.2 correctly and puts its content in myout.all.

    I am very perplexed, please help!

  2. #2
    Join Date
    Jun 2007
    Greater Boston
    Ubuntu 12.04 Precise Pangolin

    Re: Shell script would not copy my files

    1) What does exe do?

    2) How are you running this script? What does your command line look like?

    3) Enter pwd. What is the result of running the command and do you have permissions to write files there?

    4) Enter ls -ld /home/your-home-directory Is it write-protected?

    5) Could it be that exe cannot create myout and the copy fails, because there is nothing to copy?
    Last edited by cmnorton; January 30th, 2009 at 10:45 PM. Reason: fix numbering

Tags for this Thread


Posting Permissions

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