Search Results

Search: Posts Made By: antuan
2,514
Posted By antuan
Sorry but, if you could write the complete...
Sorry but, if you could write the complete command I would understand better... I know how to declare "start" pattern but no "end" pattern, and i supose i must write code to print lines ... thank you!
2,514
Posted By antuan
Show lines between frist and last appearance
Dear all,

I want to show all lines between the first and the last appearance of a string in a file. This string is a input parameter of a script. I have some ideas with grep -n but i'm sure that I...
29,583
Posted By antuan
Thank you for your help radoulov, In the...
Thank you for your help radoulov,


In the end I got the brute force solution, redirecting the command to an aux script file pasting the external variable into the awk command and executing the...
29,583
Posted By antuan
i tested all cases. note that $id is an...
i tested all cases.
note that $id is an external variable, and its what i want to put as AWK pattern.. Should I use the -v option ? Please complete my command, so I will understand you better. thanks
29,583
Posted By antuan
Still not working... cat file.txt | awk...
Still not working...

cat file.txt | awk 'BEGIN {RS="\\n\\n"} $0 ~ '$id' { print "\n"$0 }'

cat file.txt | awk 'BEGIN {RS="\\n\\n"} $0 ~ $id { print "\n"$0 }'

cat file.txt | awk -v...
29,583
Posted By antuan
No way, if i put this in the command does not...
No way, if i put this in the command does not works, it only takes the variable in the print field.

Doesn't works:

cat file.txt | awk -v var_name=$id 'BEGIN {RS="\\n\\n"} /var_name/ { print...
29,583
Posted By antuan
Insert external variable in a AWK pattern
Dear all,

¿How can i insert a variable in a AWK pattern?

I have almost succeeded in solving a puzzle with AWK but now i want to make a script. Let me explain.

cat file.txt | awk 'BEGIN...
1,769
Posted By antuan
Thank you very much rdcwayx, but i have a...
Thank you very much rdcwayx, but i have a problem, the date can appear behind the text in the parragraph and the output is not right. One solution would be put in the RS "^ 2009-11-10" to capture...
1,769
Posted By antuan
Original file: 2009-11-10...
Original file:

2009-11-10 09:32:13:TextTextTextTextTextTextTextTextTextTextText
TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText...
1,769
Posted By antuan
Harder filtering, HELP ME PLEASE
Hi,

I wrote a post last friday but i think that i have not explained well.

I need help with shell script commands to filter information from a text file. This text file is divided into...
1,636
Posted By antuan
SOS whit SED
Hello,

I know how to get a solution of a filtering problem with AWK, but i need change default field separator by a regular expression. awk -F "xxx"

What i want to do is take a stranza as a...
3,136
Posted By antuan
Ayuda con SED
Saludos

Necesito utilizar SED para crear una herramienta que me facilite el trabajo. El objetivo es filtrar información de un log para que me muestre solamente los registros que contengan una...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy