Re: Books or Debian wrong? and other stuff
On Fri, May 08, 1998 at 01:07:44PM -0400, Thomas J. Malloy wrote:
> When I, an linux and unix novice, find that commands I am entering are not
> yielding the results I expect how do I know if this failure is caused by a
> program bug, an error in the book or man page, my error or something else?
> For example on page 104 of "Learning the Bash Shell" O'reilly there is the
> following command
> vi $(grep -l 'command substitution' ch*)
>
> According to the text should load into the vi editor a file that is a list
> of the files in the PWD that begin with "ch" which contain the string
> "command substition". The man page for grep would seem to confirm this
> However when I typed
> vi $(grep -l 'linux' *.txt)
> it loaded all the documents into vi not a list of documents. Is the book
> wrong?
The book is wrong. Debian's behavior is correct. You'd have to save the
list of files _to_ a file before vi would be able to read it as a list:
grep -l linux *.txt > tmpfile
vi tmpfile
Instead, what you're doing is feeding the output of the grep command to
the command line. Try this for clarification:
echo $(grep -l linux *.txt)
Or this:
echo `grep -l linux *.txt`
> And as long as I am here, I have noticed that the escape charactor in
> kermit does not work ^\. Neither does there seem to be anyway to exit
> dosemu other than killing the process.
Kermit is full of bugs, and hamm does not have a current version.
You can exit dosemu by running the "exitemu" program.
Jeff
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: