Article 5KPJT [SOLVED] ls giving me false error report; ": No such file or directory."

[SOLVED] ls giving me false error report; ": No such file or directory."

by
whyyes,Iamthatguy
from LinuxQuestions.org on (#5KPJT)
(I don't really post so if I'm doing anything wrong please let me know.)

The directory I'm working in is:
~/mycode/scripty/sed

Code:$cat files.txt
/etc/passwd
/etc/group
/home/daviz/mycode/scripty/sed/testsample.txt

$cat testsample.txt
This is a test sampleI've been learning a little bit of sed and I noticed weird output when I ran this command...

Code:$sed 's/^/ls -l /e' files.txt
-rw-r--r-- 1 root root 2554 Jun 26 04:59 /etc/passwd
-rw-r--r-- 1 root root 1294 Jun 21 01:04 /etc/group
ls: cannot access '/home/daviz/mycode/scripty/sed/testsample.txt': No such file or directory

$file /home/daviz/mycode/scritpy/sed/testsample.txt
/home/daviz/mycode/scritpy/sed/testsample.txt: ASCII text

$ls -la
total 72
drwxr-xr-x 2 daviz daviz 4096 Jun 30 01:56 .
drwxr-xr-x 4 daviz daviz 4096 Jun 29 01:55 ..
-rw-r--r-- 1 daviz daviz 121 Jun 28 20:59 employee.txt
-rw-r--r-- 1 daviz daviz 69 Jun 30 01:56 files.txt
-rw-r--r-- 1 daviz daviz 805 Jun 28 23:16 head.aux
-rw-r--r-- 1 daviz daviz 73 Jun 28 07:55 log.txt
-rwxr--r-- 1 daviz daviz 317 Jun 28 08:55 mycommands.sed
-rw-r--r-- 1 daviz daviz 170 Jun 28 08:27 numbers.txt
-rw-r--r-- 1 daviz daviz 59 Jun 28 02:29 output.txt
-rw-r--r-- 1 daviz daviz 33 Jun 28 02:31 path.txt
-rwxr--r-- 1 daviz daviz 35 Jun 28 08:58 sed2.sed
-rwxr--r-- 1 daviz daviz 111 Jun 25 08:26 sedprint.sh
-rw-r--r-- 1 daviz daviz 133 Jun 26 03:24 substitute-locate.txt
-rw-r--r-- 1 daviz daviz 51 Jun 28 23:13 tabfile.txt
-rw-r--r-- 1 daviz daviz 48 Jun 28 08:32 test.html
-rw-r--r-- 1 daviz daviz 22 Jun 30 01:56 testsample.txt
-rw-r--r-- 1 daviz daviz 32 Jun 25 07:50 test-script.sed
-rw-r--r-- 1 daviz daviz 79 Jun 28 08:23 words.txtI've created this directory as a regular user and I can't figure out why ls gives me that error in that particular directory when sed executes it through a file but other utilities seem to respond to it as expected. I've been trying to find out through google but haven't been able to narrow down the culprit cause of this.

I don't know if it has anything to do with file permissions but the output of "ls -la" suggests that everything is fine.
Not sure exactly what else I can do to debug that "ls" error since the file definitely exists and it can read it when I call it from the shell just fine.
Any ideas?latest?d=yIl2AUoC8zA latest?i=aKeLU1bV2No:cR8k2O_REzA:F7zBnMy latest?i=aKeLU1bV2No:cR8k2O_REzA:V_sGLiP latest?d=qj6IDK7rITs latest?i=aKeLU1bV2No:cR8k2O_REzA:gIN9vFwaKeLU1bV2No
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments