10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to remove all the lines and spaces where the count in $4 or $5 is greater than 1 (more than 1 letter). The file and the output are tab-delimited. Thank you :).
file
X 5811530 . G C NLGN4X
17 10544696 . GA G MYH3
9 96439004 . C ... (1 Reply)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
Discussion started by: cmccabe
7 Replies
3. Shell Programming and Scripting
In the below awk using the tab-delimited input, I am trying count the - symbol in $5 and output the count as well as the renamed condition ins. I am also count the - symbol in $6 and output the count as well as the renamed condition del. I am also count the tomes that in $5 and $6 there are... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. Shell Programming and Scripting
Hi,
file1.txt
AAA
BBB
CCC
DDD
file2.txt
abc|AAA|AAAabcbcs|fnwufnq
bca|nwruqf|AAA|fwfwwefwef
fmimwe|BBB|fnqwufw|wufbqw
wcdbi|CCC|wefnwin|wfwwf
DDD|wabvfav|wqef|fwbwqfwfe
i need the count of rows of file1.txt present in the file2.txt
required output:
AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies
5. UNIX for Dummies Questions & Answers
Hi,
let's say an input looks like:
A|C|C|D
A|C|I|E
A|B|I|C
A|T|I|B
as the title of the thread explains, I am trying to get something like:
1|A=4
2|C=2|B=1|T=1
3|I=3|C=1
4|D=1|E=1|C=1|B=1
i.e. a count of every character in each field (first column of output) independently, sorted... (4 Replies)
Discussion started by: beca123456
4 Replies
6. Shell Programming and Scripting
Hello,
I do have folders containing having funny strings in their names and one space.
First, I do remove the funny strings and replace the space by an underscore.
find . -name '* *' | while read file;
do
target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies
7. Shell Programming and Scripting
Hi,
i am trying to count the fields in a file.
Input:
100,1000,,2000,3000,10/26/2012 12:12:30
200,3000,,1000,01/28/2012 17:12:30
300,5000,,5000,7000,09/06/2012 16:12:30
output:
Cout of the fileds for each row
6
5
6
awk -F"," '{print $NF}' file1.txt
When i try with above awk... (3 Replies)
Discussion started by: onesuri
3 Replies
8. Shell Programming and Scripting
I currently use LaTeX together with a sed script to set cloze test papers for my students. I currently pepend and equals sign to the front of the words I want to leave out in the finished test, =perpendicular, for example. I am able to number the blanks using a variable in LaTeX. I would like to... (8 Replies)
Discussion started by: maouinin
8 Replies
9. Shell Programming and Scripting
I want to sort lines by how many times a string occurs in each line (the most times first).
I know how to do this in two passes (add a count field in the first pass then sort on it in the second pass).
However, can it be done more optimally with a single AWK command? My AWK has improved... (11 Replies)
Discussion started by: Michael Stora
11 Replies
10. UNIX for Dummies Questions & Answers
hi forums
i need help with a little problem i am having.
i need to count the number of fields that are in a saved variable so i can use that number to make a different function work properly.
is there a way of doing this without using SED/AWK?
anything would be greatly appreciated (4 Replies)
Discussion started by: strasner
4 Replies