executing with Bash (Re: Shell source with relative pathname does not work)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> `bash` seem to do searching in `.', but this must be its feature.

And this one seem like potential problem:

Bash actually finds valid "commands" (other than first line with
'%PDF-1.3') in a PDF file and tries to execute them.

olecom@flower:/tmp$ dash -c '. ./AT32UC3A-doc32058.pdf'
: not founddoc32058.pdf: 1: %PDF-1.2
./AT32UC3A-doc32058.pdf: 1: Syntax error: Unterminated quoted string
olecom@flower:/tmp$ bash -c '. ./AT32UC3A-doc32058.pdf'
./AT32UC3A-doc32058.pdf: line 1: fg: no job control
./AT32UC3A-doc32058.pdf: line 2: 57950: command not found
olecom@flower:/tmp$
olecom@flower:/tmp$ dash -c '. ./foo.pdf'
: not found1: %PDF-1.3
./foo.pdf: 1: Syntax error: Unterminated quoted string
olecom@flower:/tmp$ bash -c '. ./foo.pdf'
./foo.pdf: line 1: fg: no job control
./foo.pdf: line 2: e: command not found
./foo.pdf: line 2: g: command not found
./foo.pdf: line 2: 102: command not found
olecom@flower:/tmp$


Even '-e' flag is somewhat wired:


olecom@flower:/tmp$ dash -e -c '. ./foo.pdf'
: not found1: %PDF-1.3
olecom@flower:/tmp$
olecom@flower:/tmp$ bash -e -c '. ./foo.pdf'
./foo.pdf: line 1: fg: no job control
olecom@flower:/tmp$
____
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux