Find the answer to your Linux question:
Results 1 to 5 of 5
cat shelltest awk -f ./LCD.awk ./time2Collection.txt > abc.txt see above, just one command in shell. when running it , linux shows ": Operation not permitted". If cut down "> abc.txt", ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    8

    Using > to output a file in shell, linux show ": Operation not permitted"

    cat shelltest
    awk -f ./LCD.awk ./time2Collection.txt > abc.txt

    see above, just one command in shell. when running it , linux shows ": Operation not permitted". If cut down "> abc.txt", It's OK.

    but strange thing is , when i ran this awk command directly in linux command line, it's ok. I login in linux with Root.

    how to solve it?

    thank you.

  2. #2
    Just Joined!
    Join Date
    Sep 2009
    Posts
    8

    why on one help me?

    why on one help me?

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    It is likely that you do not have execute+write permission on the directory you are in. Try >/tmp/abc.txt instead.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Sep 2009
    Posts
    8
    Thank you very much. It works.
    but it's strange to me!

    if I run awk -f LCD.awk time2Collection.txt > abc.txt in current folder, It's OK and abc.txt is created correctly. but I run shell which has same command in this folder, it will show "Operation not permitted"

    Do you konw how to fix it. I want to let abc.txt creat in currect folder.
    thank you

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Check the permissions of the shell script.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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