10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi can you please help with the below ?
source file:
Column1,Column2,Column3,Column4
abc,123,dir1/FXX/F19,1
abc,123,dir1/FXX/F20,1
abc,123,dir1/FXX/F23,2
abc,123,dir1/FXX/C25,2
abc,123,dir1/FXX/X25,2
abc,123,dir1/FXX/A23,3
abc,123,dir1/FXX/Z25,3
abc,123,dir1/FXX/Y25,4
I want to... (3 Replies)
Discussion started by: paul1234
3 Replies
2. Shell Programming and Scripting
Hello,
I would like to group/sort a file of records by a particular field and then count how many records belong in that grouping.
For example say I have the following data:
1234|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|AA
ABCD|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|AA
EFGH|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|BB... (14 Replies)
Discussion started by: Nik44
14 Replies
3. Shell Programming and Scripting
Hi All,
I want to read the input file and store the output in the Output file. I pasted the sample Input and Output file below. Help me with this.
Input file
=================================
ITEM1 AAAAA 1
ITEM1 BBBBB 1
ITEM1 CCCCC 1
ITEM2 AAAAA 5
ITEM2 CCCCC 4... (1 Reply)
Discussion started by: humaemo
1 Replies
4. Shell Programming and Scripting
awk 'FNR==NR {a; next} $NF in a' genes.txt refseq_exons.txt > output.txt
I can not figure out how to group the same name in $4 together.
Basically, all the SKI together in separate rows and all the TGFB2. Thank you :).
chr1 2160133 2161174 SKI
chr1 218518675 218520389 TGFB2... (1 Reply)
Discussion started by: cmccabe
1 Replies
5. UNIX for Dummies Questions & Answers
How do you do grouping in grep? Here's how I tried it at first:
egrep 'qualit(y|ies)' /usr/share/dict/words
-bash: syntax error near unexpected token `('
I'm using GNUgrep, and I found this on their site. grep regular expression syntax
So I tried this:
egrep 'qualit\(y\|ies\)'... (2 Replies)
Discussion started by: sudon't
2 Replies
6. Shell Programming and Scripting
Whats a good way to group (by adding a new integer to the front of each line) pairs of lines, such that lines 1 & 2 are group 1, lines 3 & 4 are group 2, etc...
ex input:
A
B
C
D
etc...
ex output:
1A
1B
2C
2D
etc... (5 Replies)
Discussion started by: watingo
5 Replies
7. UNIX for Advanced & Expert Users
Hi all,
I have input lines like below:
A;100;Paris;City;10;0;0
A;100;Paris;City;0;10;0
A;100;Paris;City in Europe;0;0;20
B;101;London;City;20;0;0
B;101;London;City;0;20;0
B;101;London;City in Europe;0;0;40
I need to group the above lines to:
A;100;Paris;City in Europe;10;10;20... (4 Replies)
Discussion started by: andy2000
4 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have a set data as shown below, and i would like to eliminate the name that no children - boy and girl. What is the appropriate command can i use(other than grep)? Please assist...
My input:
name sex marital status children - boy children - girl ... (3 Replies)
Discussion started by: 793589
3 Replies
9. UNIX for Dummies Questions & Answers
how would I write a command line that creates a new file named stuff.txt in the current working directory which contains the number of directories in the current working directory, followed by the number of empty files in the current working directory, followed by the name of the working directory? (3 Replies)
Discussion started by: jorogon0099
3 Replies
10. Shell Programming and Scripting
i am using the c shell on solaris.
directories i'm working with:
ls -1d DIV*
DIV_dental/
DIV_ibc/
DIV_ifc/
DIV_index/
DIV_pharm/
DIV_sectionI/
DIV_sectionI-title/
DIV_sectionI-toc/
DIV_sectionII-title/
DIV_sectionII-toc/
DIV_standing/
DIV_standing-toc/
DIV_title/
DIV_vision/ (1 Reply)
Discussion started by: effigy
1 Replies