10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a text file containing the following for example:
This number 123456 is in line number one.
Line number two contains -333444 number.
The third line has a 111111 in between and also 435.
Line number four has :444444 in it.
Line five has a in front like a555555.
how can i... (5 Replies)
Discussion started by: james2009
5 Replies
2. Shell Programming and Scripting
Hello,
I have a requirement to replace the whole string with first occurence of value of a key-value pair.
I have to do this inside awk, as the data I need to work is inside an awk loop.
value of my variable(say LogText) looks like:
LogText=
date=04Mar message=hello1 name=caq... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
3. Shell Programming and Scripting
Hi,
Do anybody know how to use awk to count the pattern at specific column?
Input file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a
.
.
Output file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a 3
.
.
I plan to count how many "miR" in column 3... (2 Replies)
Discussion started by: cpp_beginner
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I am very now to this, hope you can help,
I am looking into editing a file in Solaris, with dinamic collums (lenght varies) and I need 2 things to be made, the fist is to filter the first column and third column from the file bellow file.txt, and create a new file with the 2 filtered... (8 Replies)
Discussion started by: jpbastos
8 Replies
5. Shell Programming and Scripting
Hi,
I would like extract some lines from file csv using awk , below the example:
I have the file test.csv with in content below.
FLUSSO;COD;DATA_LAV;ESITO
ULL;78;17/09/2013;OL
ULL;45;05/09/2013;Apertura
NP;45;13/09/2013;Riallineamento
ULLNP;78;17/09/2013;OL
NPG;14;12/09/2013;AperturaTK... (6 Replies)
Discussion started by: giankan
6 Replies
6. Shell Programming and Scripting
Hi ,
I have an issue where I want to parse through the output from a file and I want to grab the nth occurrence of text in between two patterns preferably using awk or sed
! TICKET NBR : 1 !GSI : 102 ! 3100.2.112.1 11/06/2013 15:56:29 ! 3100.2.22.3 98 ! 3100.2.134.2... (8 Replies)
Discussion started by: OTNA
8 Replies
7. Shell Programming and Scripting
Hello people,
Once more I need your help with SED/AWK
I need to delete up to the Nth occurence of a char (from the beggining) and until the Mth occurence of a char (from the end)
Example:
Input:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
Output:
i,j
Must delete up to the... (2 Replies)
Discussion started by: drbiloukos
2 Replies
8. Shell Programming and Scripting
Dear Forum,
I would like to know how could I found every result from one column at a table based at two table.
Exemplo:
Table:
Red 4
Red 5
Red 10
Black 33
Black 44
Black 5
Green 2
Green 55
Green 78
I would like to have every color with the lower result... (12 Replies)
Discussion started by: lColli
12 Replies
9. Shell Programming and Scripting
Hello all,
I have a input file like this.
input file
---------------
abc ab001 + ab002 zca
acb ab006 + ab007 caz
cba ab003 + ab004 zca
bac ab004 - ab005 zac
bca ab002 - ab003 cza
cba ab005 + ab006 acz
cba ab005 ... (5 Replies)
Discussion started by: admax
5 Replies
10. Shell Programming and Scripting
I want to filter 2nd column = 2 using awk
$ cat t
1 2
2 4
$ VAR=2
#variable worked in print
$ cat t | awk -v ID=$VAR ' { print ID}'
2
2
# but variable didn't work in awk filter
$ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies