10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
I have a file with fields as follows which has last field in multiple lines. I would like to combine a line which has three fields with single field line for as shown in expected output. Please help.
INPUT
hname01 windows appnamec1eda_p1, ... (5 Replies)
Discussion started by: shunya
5 Replies
2. Shell Programming and Scripting
Hello
How can I get a number of occurrence count for this file;
ERR315389.1000156 CTTGAAGAAGAATTGAAAACTGTGACGAACAACTTGAAGTCACTGGAGGCTCAGGCTGAGAAGTACTCGCAGAAGGAAGACAGATATGAGGAAGAG
ERR315389.1000281 ... (3 Replies)
Discussion started by: Wan Fahmi
3 Replies
3. Programming
Hi all,
If i would like to process a file input as below:
col1 col2 col3 ...col100
1 A C E A ...
3 D E G A
5 T T A A
6 D C A G
how can i perform a for loop to count the occurences of letters in each column? (just like uniq -c ) in every column.
on top of that, i would also like... (8 Replies)
Discussion started by: iling14
8 Replies
4. Shell Programming and Scripting
Hi,
Please help with this.
I have several excel files (with and .xlsx format) with 10-15 columns each.
They all have the same type of data but the columns are not ordered in the same way.
Here is a 3 column example. What I want to do add the alphabet
from column 2 to column 3, provided... (9 Replies)
Discussion started by: newbie83
9 Replies
5. Shell Programming and Scripting
Hello,
I have some tab delimited data and I need to move the last col. I could hard code it,
awk '{ print $1,$NF,$2,$3,$4,etc }' infile > outfile
but it would be nice to know the syntax to print a range cols.
I know in cut you can do,
cut -f 1,4-8,11-
to print fields 1,... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
6. Shell Programming and Scripting
Hi,
I have a file that is 430K lines long. It has records like below
|site1|MAP
|site2|MAP
|site1|MODAL
|site2|MAP
|site2|MODAL
|site2|LINK
|site1|LINK
My task is to count the number of time MAP, MODAL, LINK occurs for a single site and write new records like below to a new file
... (5 Replies)
Discussion started by: reach.sree@gmai
5 Replies
7. Shell Programming and Scripting
Hi ,
I have a file which has multiple rows of data, i want to match the pattern for two columns and if both conditions satisfied i have to add the counter by 1 and finally print the count value. How to proceed...
I tried in this way...
awk -F, 'BEGIN {cnt = 0} {if $6 == "VLY278" &&... (6 Replies)
Discussion started by: aemunathan
6 Replies
8. Shell Programming and Scripting
Hi Unix gurus,
I have a requirement where I need to find the file count based on unique file names.
OPEN_INV_MMDDYYYY_HHMM.xls
OPEN_INV_MMDDYYYY_HHMM.xls
OPEN_INV_MMDDYYYY_HHMM.xls
CLOSE_INV_MMDDYYYY_HHMM.xls
CLOSE_INV_MMDDYYYY_HHMM.xls
OPEN_INV_MMDDYYYY_HHMM.txt... (2 Replies)
Discussion started by: shankar1dada
2 Replies
9. UNIX for Advanced & Expert Users
Hello everyone,
I am writing a script to process data from the ATP world tour.
I have a file which contains:
t=540 y=2011 r=1 p=N409
t=540 y=2011 r=2 p=N409
t=540 y=2011 r=3 p=N409
t=540 y=2011 r=4 p=N409
t=520 y=2011 r=1 p=N409
t=520 y=2011 r=2 p=N409
t=520 y=2011 r=3 p=N409
The... (4 Replies)
Discussion started by: imahmoud
4 Replies
10. Shell Programming and Scripting
Hi,
I can't find how to achive such thing, please help.
I have try with uniq and comm but those command can't compare columns just whole lines,
I think awk will be the best but awk is magic for me as of now.
file a
a1~a2~a3~a4~a6~a7~a8
file b
b1~b2~b3~b4~b6~b7~b8
output 1:
compare... (2 Replies)
Discussion started by: pp56825
2 Replies