tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ What is the bash syntax for [[ ]] - and how to find in "man bash" ?

extract columns from line ▻

how do you concatenate all the lines in a file together?

In article <8b8loj$qtf$1@nnrp1.deja.com>,  <seonghuhn@my-deja.com> wrote:
>I tried doing this but it doesn't seem to work too well, possibly
>because the find command returns with 3320 files. Here is what I tried:

And what exactly happens when you try it?  All you say is "it doesn't
seem to work too well".  We're not psychic, I'm afraid.

>find . -name "*.java" | tr '\n' ' ' | xargs etags

You don't need the `tr' there: xargs splits its input (into arguments
for the subsidiary command) at any whitespace: LF or space makes no
difference.  (It might also be causing the problem: possibly `xargs'
can't deal with the partial line you've created here.)

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: how do you concatenate all the lines in a file together?
Date: 22 Mar 2000 10:37:44 -0000
Message-ID: <8ba7qe$acr$1@ltpcg.star.le.ac.uk>
References: <8b6bh0$4ih$1@nnrp1.deja.com>
  <uazB4.6109$34.136811@news.swbell.net> <8b8loj$qtf$1@nnrp1.deja.com>

△ comp.unix.shell △

◅ What is the bash syntax for [[ ]] - and how to find in "man bash" ?

extract columns from line ▻