On Wed, Mar 18, 2009 at 11:19:20AM -0500, Boyd Stephen Smith Jr. wrote:
In 1f1816a90903180556k56e3e592qa14c55d1c3193...@mail.gmail.com, John O
Laoi wrote:
With respect to the command line, I have fixed on
find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep
string-being sought
In 20090318164208.ga14...@localhost, Ken Irving wrote:
On Wed, Mar 18, 2009 at 11:19:20AM -0500, Boyd Stephen Smith Jr. wrote:
I think I'd rewrite it as:
find . \
-name '*.odt' \
-exec sh -c 'unzip -c $1 content.xml | grep -q regex' \{} \; \
-print
I'm not sure what the rules are for find
| grep -q regex' \{} \; \
-print
I'm not sure what the rules are for find substituting {} within
another argument, so it seems best to write it as a separate argument.
If you have anything that matches *.odt in the current directory, the
find won't work[1] unless you quote it. You
Hello,
I sometimes need to find a file, and I only know of some text contained
therein.
So I launch a search as follows:
$ grep -r text i am looking for /home/john
OR
$ find /home/john -type f -exec grep -i * **text i am looking for * '{}'
\; -print
where /home/john is my home directory
do you do that?
|Has anybody got a solution that will recursively search a directory
looking for a file that contains some specified text, and will search
within openoffice file?|
What about
find . -name *.odt -exec unzip -c {} content.xml | grep what you want
to find\; -print
Sjoerd
Sjoerd Hardeman wrote:
What about
find . -name *.odt -exec unzip -c {} content.xml | grep what you want
to find\; -print
This one is not working, use
find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep what
you want to find' \; -print
instead.
Sjoerd
--
() ascii ribbon
On Mon, Mar 16, 2009 at 15:29:50 +0100, Sjoerd Hardeman
(sjo...@lorentz.leidenuniv.nl) wrote:
Sjoerd Hardeman wrote:
What about
find . -name *.odt -exec unzip -c {} content.xml | grep what you want
to find\; -print
This one is not working, use
find . -name *.odt -exec sh -c 'unzip -c
Bob Cox schrieb:
On Mon, Mar 16, 2009 at 15:29:50 +0100, Sjoerd Hardeman
(sjo...@lorentz.leidenuniv.nl) wrote:
Sjoerd Hardeman wrote:
What about
find . -name *.odt -exec unzip -c {} content.xml | grep what you want
to find\; -print
This one is not working, use
find . -name *.odt
Sjoerd Hardeman wrote:
Sjoerd Hardeman wrote:
What about
find . -name *.odt -exec unzip -c {} content.xml | grep what you
want to find\; -print
This one is not working, use
find . -name *.odt -exec sh -c 'unzip -c {} content.xml | grep what
you want to find' \; -print
instead.
Sjoerd
Nagy Daniel wrote:
the text is here:
http://pastebin.com/f37214a30
and I only want this string:
http://downloads.sourceforge.net/portableapps/nvu_portable_1.0_rev_5_en-us.paf.exe?download
so I want to search like:
| grep downloads.sourceforge.net http://downloads.sourceforge.net
in colums just like grep does in rows, but i
don't know how many colums I will have, so: awk is not good, beacuse awk
{print $1$2$3} it's not a good soultion:S i have too many colums
hmm I don't quite see the problem
--
http://soup.alt.delete.co.at
http://www.xing.com/profile/Martin_Marcher
http
Nagy Daniel n.dan...@gmail.com wrote:
cat text.txt | perl -ne 'print $1\n while (/href=\(.+?)\/ig)' | grep
sourceforge | grep nvu
You don't need cat for a single file!
perl -ne 'print $1\n while (/href=\(.+?)\/ig)' text.txt |
grep sourceforge | grep nvu
Or, by using perl
Is there a methodfor searching in colums just like grep does in rows, but i
don't know how many colums I will have, so: awk is not good, beacuse awk
{print $1$2$3} it's not a good soultion:S i have too many colums
Nagy Daniel wrote:
Is there a methodfor searching in colums just like grep does in rows,
but i don't know how many colums I will have, so: awk is not good,
beacuse awk {print $1$2$3} it's not a good soultion:S i have too many
colums
There is always perl!
If you send an example of what
the text is here:
http://pastebin.com/f37214a30
and I only want this string:
http://downloads.sourceforge.net/portableapps/nvu_portable_1.0_rev_5_en-us.paf.exe?download
so I want to search like:
| grep downloads.sourceforge.net | grep nvu
but the text isn't separated with enters, and I want
On Wed, Feb 11, 2009 at 12:26:07PM +0100, Nagy Daniel wrote:
the text is here:
http://pastebin.com/f37214a30
I have copied that into a file /tmp/w
and I only want this string:
http://downloads.sourceforge.net/portableapps/
nvu_portable_1.0_rev_5_en-us.paf.exe?download
% grep -o
On 2009-02-11_12:09:20, Nagy Daniel wrote:
Is there a methodfor searching in colums just like grep does in rows, but i
don't know how many colums I will have, so: awk is not good, beacuse awk
{print $1$2$3} it's not a good soultion:S i have too many colums
Yes, and its call SQL. If you only
Nagy Daniel wrote:
the text is here:
http://pastebin.com/f37214a30
and I only want this string:
http://downloads.sourceforge.net/portableapps/nvu_portable_1.0_rev_5_en-us.paf.exe?download
so I want to search like:
| grep downloads.sourceforge.net http://downloads.sourceforge.net |
grep
When the date was Wednesday 11 February 2009, Nagy Daniel wrote:
the text is here:
http://pastebin.com/f37214a30
and I only want this string:
http://downloads.sourceforge.net/portableapps/nvu_portable_1.0_rev_5_en-u
s.paf.exe?download
It seems to me that you only want to grab urls. This
Thank you!!!
The solution was this:
cat text.txt | perl -ne 'print $1\n while (/href=\(.+?)\/ig)' | grep
sourceforge | grep nvu
2009/2/11 Michael Iatrou m.iat...@freemail.gr
When the date was Wednesday 11 February 2009, Nagy Daniel wrote:
the text is here:
http://pastebin.com
/^CommID: (.*)/\1/;
y tendrías en $valor el valor de la variable que deseas.
Date: Mon, 27 Oct 2008 09:42:01 -0300
From: [EMAIL PROTECTED]
To: debian-user-spanish@lists.debian.org
Subject: Re: Grep en perl
El día 27/10/08, Javier [EMAIL PROTECTED] escribió:
Hola lista,
estoy
.
La idea es leer con el programa esta entrada y luego conseguir
quedarme en una variable con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
Tal vez algo como lo
con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
--
Power by Debian.
Un saludo,
Javier.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
.
La idea es leer con el programa esta entrada y luego conseguir
quedarme en una variable con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
aquí tenés un ejemplo de uso de grep:
http://perl.about.com/od
en una variable con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
No tengo la más pálida idea de cómo programar en Perl, pero si sé a
ciencia cierta que Perl es uno de los lenguajes que mejor soporte tiene
de expresiones
idea es leer con el programa esta entrada y luego conseguir
quedarme en una variable con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
Tal vez algo como lo que sigue te sirva:
sub get_value {
my $body = shift || return undef
es leer con el programa esta entrada y luego conseguir
quedarme en una variable con el valor c00040. Alguna idea de
cómo realizar ese grep en perl. Lo intenté, pero en perl no consigo
sacarlo.
$body_str tiene '\n' ?
Parece que si
Hace un while y busca la linea que contenga CommID
pingouin osmolateur [EMAIL PROTECTED] writes:
- Message d'origine
De : François Cerbelle [EMAIL PROTECTED]
Le Ven 12 septembre 2008 16:08, steve a écrit :
[...]
J'ai une petite tête mais je bosse au boulot sous xp mais j'écris mes
messages sous mutt depuis chez moi grâce à putty
Le Sam 13 septembre 2008 10:11, Leopold BAILLY a écrit :
[...]
Oui, avec httptunnel ça marche vraiment très bien. Il est empaqueté
Cygwin pour l'installation du client sous Win$ et empaqueté
Debian pour l'installation du serveur.
Oui, j'ai juste pas envie de prendre le risque de me faire
Bonjour,
Je recherche dans un fichier mail.log si un mail concerne dupont ou durand
Savez-vous si je peu faire cela en une seule commande ?
Merci.
Patrice.
Le 2008-09-12, à 15:05:11 +0200, Patrice OLIVER ([EMAIL PROTECTED]) a écrit :
Bonjour,
Salut,
Je recherche dans un fichier mail.log si un mail concerne dupont ou durand
Savez-vous si je peu faire cela en une seule commande ?
egrep '(dupont|durand)' mail.log
Merci.
Patrice.
Bonjour
#man egrep
A+
- Message d'origine
De : Patrice OLIVER [EMAIL PROTECTED]
À : Debian-User-FR debian-user-french@lists.debian.org
Envoyé le : Vendredi, 12 Septembre 2008, 15h05mn 11s
Objet : recherche avec un grep
Bonjour,
Je recherche dans un fichier mail.log si un mail
Le 2008-09-12, à 13:19:00 +, pingouin osmolateur ([EMAIL PROTECTED]) a
écrit :
Bonjour
#man egrep
^^^
pas bien de bosser sous root ;-)
--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/DebFrFrenchLists
Vous pouvez aussi ajouter le mot
[EMAIL PROTECTED]
À : debian-user-french@lists.debian.org
Envoyé le : Vendredi, 12 Septembre 2008, 15h27mn 34s
Objet : Re: Re : recherche avec un grep
Le 2008-09-12, à 13:19:00 +, pingouin osmolateur ([EMAIL PROTECTED]) a
écrit :
Bonjour
#man egrep
^^^
pas bien de bosser sous
Le 2008-09-12, à 13:52:40 +, pingouin osmolateur ([EMAIL PROTECTED]) a
écrit :
Tu veux dire pas bien de bosser sous windows XP ;-)
J'ai pas mon pc perso, je suis au boulot alors je tape les commandes de tête
(c'est pas évident j'ai une grosse tête)
J'ai une petite tête mais je bosse au
Le Ven 12 septembre 2008 16:08, steve a écrit :
[...]
J'ai une petite tête mais je bosse au boulot sous xp mais j'écris mes
messages sous mutt depuis chez moi grâce à putty :-)
Comme tu as de la chance de ne pas être derrière un pare-feu et proxy ! ;-)
Fanfan
--
http://www.cerbelle.net -
: Re : recherche avec un grep
Le Ven 12 septembre 2008 16:08, steve a écrit :
[...]
J'ai une petite tête mais je bosse au boulot sous xp mais j'écris mes
messages sous mutt depuis chez moi grâce à putty :-)
Comme tu as de la chance de ne pas être derrière un pare-feu et proxy ! ;-)
Fanfan
steve wrote:
Le 2008-09-12, à 13:19:00 +, pingouin osmolateur ([EMAIL PROTECTED]) a
écrit :
Bonjour
#man egrep
^^^
pas bien de bosser sous root ;-)
oui, faut virer root du système :)
c'est pareil avec le dernier wagon dans les trains...
--
Lisez la FAQ de la
Patrice OLIVER wrote:
Bonjour,
Je recherche dans un fichier mail.log si un mail concerne dupont ou durand
ça dépend ce que tu utilises comme système de mail (sendmail, postfix,
courier, exim, qmail, ...).
ça dépend aussi ce que tu veux comme infos.
Savez-vous si je peu faire cela en une
Le 2008-09-12, à 16:16:03 +0200, François Cerbelle ([EMAIL PROTECTED]) a écrit
:
Lignes : 21
Le Ven 12 septembre 2008 16:08, steve a écrit :
[...]
J'ai une petite tête mais je bosse au boulot sous xp mais j'écris mes
messages sous mutt depuis chez moi grâce à putty :-)
Comme tu as
Hola lista
Estoy con un script y tengo problemillas con el siguiente comando:
NO FUNCIONA:
sed -e s/^\/dev\/[s,h]d[a-z][1-9]/`blkid -s UUID \`/ archivo.datos
En este caso no se intercambia por el valor que deberia, en teoria
sda1 hda1...
pero si añado un echo antes del blkid si intercambia
gunix escreveu:
alguem sabe se é possivel eu usar o comando grep e nao mostrar valores
repitidos?
Ex: Tenho uma lista de sites e quero ver todos, mas nao quero exibir
os repitidos.
Algeum sabe como posso fazer isso?
Olá,
Não sei qual a necessidade, mas se for para apenas listar
Galera,
alguem sabe se é possivel eu usar o comando grep e nao mostrar valores
repitidos?
Ex:
TEnho uma lista de sites e quero ver todos, mas nao quero exibir os
repitidos.
Algeum sabe como posso fazer isso?
Att
Gunix
Em Sáb, 07/06/2008 12:46, gunix escreveu:
TEnho uma lista de sites e quero ver todos, mas nao quero exibir os
repitidos.
Talvez o que você quer fazer possa ser feito com o sort -u, ou com o
uniq.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 07-06-2008 12:46, gunix wrote:
Galera,
alguem sabe se é possivel eu usar o comando grep e nao mostrar valores
repitidos?
Ex:
TEnho uma lista de sites e quero ver todos, mas nao quero exibir os
repitidos.
Algeum sabe como posso fazer isso
Opa,
o grep realmente é básico.. eu não tinha visto sua pergunta, senão teria
respondido antes..
Tem outra coisa bacana também é a opção -v do qual voce remove uma linha
específica que contém a string, ótima para filtrar relatórios, logs e
outros..
cat arquivo |grep -v teste
ele irá remover
Olá pessoal,Há um tempo atrás postei uma duvida sobre como extrair multiplas linhas com o comando grep. Não tive respostas a respeito.Hoje respondendo um questionario simulado da Red Hat descobri uma forma de realizar este procedimento e gostaria de compartilhar aqui pois pode ser um comando muito
Boa... Muito util..
De: Pedro Celio [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 6 de maio de 2008 20:22
Para: Lista-Debian
Assunto: Solução: grep por multiplas linhas
Olá pessoal,
Há um tempo atrás postei uma duvida sobre como extrair multiplas linhas com
o comando grep. Não tive
On Mon, Apr 07, 2008 at 10:58:43PM -0400, Kamaraju S Kusumanchi wrote:
Rich Healey wrote:
Mike Bird wrote:
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep --colour=always'
This will break any scripts which assume that the output
of grep
Osamu Aoki wrote:
Also, GREP_COLORS should be used instead of GREP_COLOR.
I just now checked the man page of grep 2.5.3~dfsg-5 in unstable. It looks
like GREP_COLORS is newly introduced deprecating the use of GREP_COLOR.
GREP_COLORS did not exist in grep 2.5.1.ds2-6 (for Etch).
Thanks
On 09/04/2008, Chris Bannister [EMAIL PROTECTED] wrote:
On Tue, Apr 08, 2008 at 10:22:08AM +1000, Rich Healey wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Bird wrote:
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep
On Mon, Apr 07, 2008 at 06:49:20PM -0500, Kevin Monceaux wrote:
On Tue, 8 Apr 2008, Chris Bannister wrote:
You can always try different values of GREP_COLOR. Although I can't
seem to get yellow.
After another moment of Googling, for yellow, use:
setenv GREP_COLOR '1;33'
or your shell's
On Tue, Apr 08, 2008 at 10:22:08AM +1000, Rich Healey wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Bird wrote:
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep --colour=always'
This will break any scripts which assume
Hi,
If you work on the command line, here is a handy grep trick.
In your .bashrc put:
export GREP_COLOR=33
alias grep='grep --colour=always'
You can always try different values of GREP_COLOR.
Although I can't seem to get yellow.
Remember to:
source .bashrc
before trying
Chris Bannister wrote:
Hi,
If you work on the command line, here is a handy grep trick.
In your .bashrc put:
export GREP_COLOR=33
alias grep='grep --colour=always'
You can always try different values of GREP_COLOR.
Although I can't seem to get yellow.
Remember to:
source .bashrc
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep --colour=always'
This will break any scripts which assume that the output
of grep has not been annotated with color escape sequences.
--Mike Bird
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED
Chris,
On Tue, 8 Apr 2008, Chris Bannister wrote:
In your .bashrc put:
export GREP_COLOR=33
alias grep='grep --colour=always'
Very cool tip!! In my case, however, my .cshrc file might be a better
choice since I don't use bash, and of course the syntax is different. As
someone else
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Bird wrote:
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep --colour=always'
This will break any scripts which assume that the output
of grep has not been annotated with color escape sequences
Rich Healey wrote:
Mike Bird wrote:
On Mon April 7 2008 16:03:28 Chris Bannister wrote:
export GREP_COLOR=33
alias grep='grep --colour=always'
This will break any scripts which assume that the output
of grep has not been annotated with color escape sequences.
Those scripts
Buenas lista.
En un equipo con Debian Lenny recién salidito del horno la salida de
netstat -tanp | grep LISTEN me arroja lo siguiente:
tcp0 0 0.0.0.0:39689 http://0.0.0.0:39689
0.0.0.0:* LISTEN 2399/rpc.statd
tcp0 0 0.0.0.0:111 http
On Wed, Apr 02, 2008 at 04:05:15PM -0300, tq wrote:
Buenas lista.
En un equipo con Debian Lenny recién salidito del horno la salida de
netstat -tanp | grep LISTEN me arroja lo siguiente:
tcp0 0 0.0.0.0:39689 http://0.0.0.0:39689
0.0.0.0:* LISTEN
On Tue, 18 Mar 2008 10:54:46 -0700, Bob McGowan wrote:
Now the crontab reads:
* * * * *rootis_burning || logger get executed.
+ set -x
+ ps -eaf
+ grep -E -[dts]ao |cdrdao *write|growisofs.*speed='
root 15306 15295 0 09:29 ?00:00:00 grep -E cdrecord.*
-[dts]ao
T o n g [EMAIL PROTECTED]:
On Tue, 18 Mar 2008 10:54:46 -0700, Bob McGowan wrote:
What's happening is the grep you're running is sometimes finding itself.
That's exactly the reason. As you can see from my script that I've already
The lesson is, ps | grep blah will find grep blah
tabela arp mas nao esteja na lista do DHCP, ele é DROPADO,
pelo iptables. O problema que estou tendo é o seguinte, uso o grep para
cortar os ip's que estao cadatrados com seguinte sintaxe:
arp -n | grep eth0 | grep -F 10. | awk '{print$1}' | grep -v `cat IP` ;
Onde o arquivo IP sao os ip's
tabela arp mas nao esteja na lista do DHCP, ele é DROPADO,
pelo iptables. O problema que estou tendo é o seguinte, uso o grep para
cortar os ip's que estao cadatrados com seguinte sintaxe:
arp -n | grep eth0 | grep -F 10. | awk '{print$1}' | grep -v `cat IP` ;
Onde o arquivo IP sao os ip's
teste grep -xv
Tom Lobato
www.tinecon.com.br
Leandro Moreira escreveu:
Caros,
Estou desenvolveno um script para bloquear por meio do iptables, maquinas
nao autorizadas na rede, como ele funciona. As maquinas que sao
autorizadas, sao cadastradas no DHCP, o meu scritp extrai os ip's do
How can lsof give no output when /dev/dsp is locked? How can I find
what process uses my soundcard if not with lsof?
computer:/home/tommy# esd
/dev/dsp: Device or resource busy
computer:/home/tommy# lsof|grep /dev/dsp
computer:/home/tommy#
I have seen this behaviour whenever iceweasel
sources ya
citados con un script que los compila como ya he descrito.
También he notado que el grep no me funciona. Es decir, si haces un
lspci|grep Audio
devuelve:
grep: Audio: No existe el fichero o el directorio
Aquí os dejo la salida:
alsa-driver-1.0.15# ./configure --with-cards=hda-intel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
How can lsof give no output when /dev/dsp is locked? How can I find
what process uses my soundcard if not with lsof?
computer:/home/tommy# esd
/dev/dsp: Device or resource busy
computer:/home/tommy# lsof|grep /dev/dsp
computer:/home/tommy
On Saturday 15 December 2007 10:42:09 am Thomas Anderson wrote:
How can lsof give no output when /dev/dsp is locked? How can
I find what process uses my soundcard if not with lsof?
computer:/home/tommy# esd
/dev/dsp: Device or resource busy
computer:/home/tommy# lsof|grep /dev/dsp
computer
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd et grep, on
peut récupérer des fichiers effacés plus facilement sur une partoche ou
une image de partoche.
Si oui, est-ce que je pourrais avoir une petit exemple ou un lien vers
un tuto qui explique comment faire
Thierry B a écrit :
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd et grep, on
peut récupérer des fichiers effacés plus facilement sur une partoche ou
une image de partoche.
Si oui, est-ce que je pourrais avoir une petit exemple ou un lien vers
un tuto qui explique
pascal, lundi 8 octobre 2007, 15:55:33 CEST
Thierry B a écrit :
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd
et grep, on peut récupérer des fichiers effacés plus
facilement sur une partoche ou une image de partoche.
Si oui, est-ce que je pourrais avoir
Thierry B a écrit :
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd et grep, on
peut récupérer des fichiers effacés plus facilement sur une partoche ou
une image de partoche.
Plus facilement que quoi ?
pour les fichiers effacés, testdisk est pas mal par exemple
Le Mon, 08 Oct 2007 14:39:05 +0200
Thierry B [EMAIL PROTECTED] a écrit:
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd et grep, on
peut récupérer des fichiers effacés plus facilement sur une partoche ou
une image de partoche.
Si oui, est-ce que je pourrais avoir
François Boisson a écrit :
Le Mon, 08 Oct 2007 14:39:05 +0200
Thierry B [EMAIL PROTECTED] a écrit:
Bonjour,
J'aimerais savoir si en sachant utiliser des outils comme dd et grep, on
peut récupérer des fichiers effacés plus facilement sur une partoche ou
une image de partoche.
Si oui, est
On Jul 15, 4:20 pm, Jeff D [EMAIL PROTECTED] wrote:
probably the easiest thing to do is write up a little wrapper for grep
like so:
#!/bin/sh
if [ -z $1 ] ; then
echo please enter file type
exit 1
fi
if [ -z $2 ] ; then
echo please enter search
Any piping will eliminate the color. That's what happens,
at least, with ls.
The default for --color is to only do it with an
interactive terminal. You can specify --color=always to
ensure it is output even as part of a pipe. You can make
things like less pass the control characters through to
On Jul 16, 6:20 am, Jon Dowland [EMAIL PROTECTED] wrote:
You can specify --color=always to
Where does that command go? In bashrc?
So far, I just have the ls alias and this:
export GREP_OPTIONS='--color=auto'
Thanks,
rd
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of
Where does that command go? In bashrc?
So far, I just have the ls alias and this:
export GREP_OPTIONS='--color=auto'
It's an argument to grep. So you could manually it in with
every grep, alias grep to grep --color=always in the style
of ls in ~/.bashrc, or define the GREP_OPTIONS
BartlebyScrivener wrote:
I'm playing with recursive grep. Still fairly new to Etch.
When I grep text files and get a dozen or so results, they print to
the screen as a dense block of text. I found the color option, which
helps, but is there a way to separate each result with a blank line
BartlebyScrivener wrote:
On Jul 15, 4:20 pm, Jeff D [EMAIL PROTECTED] wrote:
probably the easiest thing to do is write up a little wrapper for grep
like so:
#!/bin/sh
if [ -z $1 ] ; then
echo please enter file type
exit 1
fi
if [ -z $2 ] ; then
echo please
BartlebyScrivener wrote:
On Jul 15, 2:30 pm, Ron Johnson [EMAIL PROTECTED] wrote:
Try this. It's untested but should nudge you in the right direction.
Almost, it prints each word on a separate line, but I'll pursue the
idea.
Thank you,
rd
grep -R 'the' * | (of=; while read f l
andy baxter wrote:
grep -R 'the' * | (of=; while read f l ; do if [ $f != $of ] ;
then echo ; fi; echo $f $l ; of=$f; done)
will put a linebreak after every new filename, as long the none of the
filenames have spaces in.
This puzzled me for a while:
[EMAIL PROTECTED]:~/tmp$ cat input
On Jul 16, 5:00 pm, William Pursell [EMAIL PROTECTED] wrote:
The following works with filenames with spaces. It
displays the filename after the text match, though.
find . -type f -name *$1 -exec sh -c grep --color -i $2 '{}' \
echo ' echo {}' echo \;
That works like a charm
I'm playing with recursive grep. Still fairly new to Etch.
When I grep text files and get a dozen or so results, they print to
the screen as a dense block of text. I found the color option, which
helps, but is there a way to separate each result with a blank line,
or highlight the file name
On 07/15/07 13:40, BartlebyScrivener wrote:
I'm playing with recursive grep. Still fairly new to Etch.
When I grep text files and get a dozen or so results, they print to
the screen as a dense block of text. I found the color option, which
helps, but is there a way to separate each result
BartlebyScrivener wrote:
I'm playing with recursive grep. Still fairly new to Etch.
When I grep text files and get a dozen or so results, they print to
the screen as a dense block of text. I found the color option, which
helps, but is there a way to separate each result with a blank line
On Jul 15, 2:30 pm, Ron Johnson [EMAIL PROTECTED] wrote:
Try this. It's untested but should nudge you in the right direction.
Almost, it prints each word on a separate line, but I'll pursue the
idea.
Thank you,
rd
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of
On Jul 15, 3:00 pm, William Pursell [EMAIL PROTECTED] wrote:
You might consider the -C (or -B or -A) options to grep.
Yes, I've played with these, too. The problem in large text files
with wrapped paragraphs, each line can be quite long, so even -C1
gives a big block before and after. But it's
On Sun, 2007-07-15 at 14:29 -0500, Ron Johnson wrote:
On 07/15/07 13:40, BartlebyScrivener wrote:
I'm playing with recursive grep. Still fairly new to Etch.
When I grep text files and get a dozen or so results, they print to
the screen as a dense block of text. I found the color option
On Sun, 15 Jul 2007, BartlebyScrivener wrote:
On Jul 15, 3:00 pm, William Pursell [EMAIL PROTECTED] wrote:
You might consider the -C (or -B or -A) options to grep.
Yes, I've played with these, too. The problem in large text files
with wrapped paragraphs, each line can be quite long, so even
On 07/15/07 15:14, BartlebyScrivener wrote:
On Jul 15, 3:00 pm, William Pursell [EMAIL PROTECTED] wrote:
You might consider the -C (or -B or -A) options to grep.
Yes, I've played with these, too. The problem in large text files
with wrapped paragraphs, each line can be quite long, so even
On 5/7/07, Daniel Vieira Dias wrote:
quero a sintaxe do grep para:
(Vou tentar and ser mais claro) or (Qual é a and sintaxe correta)
Por favor, não filosofem! ;-)
Haha, um pouco de humor na lista ajuda de vez em quando. :-)
$ cat teste
vou tentar escrever e ser mais claro
aqui nao tem
Bom, pelo exemplo dá pra copíar e usar, mas poode me explicar o que
faz o uso do '.' e do ' * ' ?
.* tem o significado booleano de um or ?
quem interpreta esse .* ? o grep? o bash?
valeu.
Em 08/05/07, Bruno Schneider[EMAIL PROTECTED] escreveu:
On 5/7/07, Daniel Vieira Dias wrote:
quero
Em Terça 08 Maio 2007 15:13, Denis escreveu:
Bom, pelo exemplo dá pra copíar e usar, mas poode me explicar o que
faz o uso do '.' e do ' * ' ?
.* tem o significado booleano de um or ?
quem interpreta esse .* ? o grep? o bash?
valeu.
http://guia-er.sourceforge.net/ponto.html#2_1_1
http
or ?
quem interpreta esse .* ? o grep? o bash?
valeu.
http://guia-er.sourceforge.net/ponto.html#2_1_1
http://guia-er.sourceforge.net/asterisco.html#2_2_2
http://guia-er.sourceforge.net/quantificadores-gulosos.html#3_2
--
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
Religion, ideology, resources
Davi escreveu:
Em Sexta 04 Maio 2007 23:12, Rodolfo Allan escreveu:
Isso é teoria dos conjuntos!!! E depois perguntam pra que serve a
matemática...
Tem como excluir algo na pesquisa, tipo grep frase1 exceto frase2 ?
grep -v frase2
man grep... =]
[]s
Caramba
Estou tentando filtrar em um arquivo as linhas onde ocorrem uma ou outra
frase mas não consegui acertar a sintaxe.
No caso de um número e uma letra é fácil, é só substituir por ex:
[1,2,9] ou [0-5] ou [a,b,y,X] ou ainda [a-z,A-Z].
Mas no caso de duas frases?? tentei:
cat arquivo | grep [Esta é
Tente dessa forma:
cat arquivo | grep -E frase 1|frase2ou cat arquivo | egrep frase
1|frase2
Abraços
Bruno.
On 5/4/07, Daniel Vieira Dias [EMAIL PROTECTED] wrote:
Estou tentando filtrar em um arquivo as linhas onde ocorrem uma ou outra
frase mas não consegui acertar a sintaxe
301 - 400 of 1159 matches
Mail list logo