10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
i need to write a shell script to "count the number of files in the current directory but without using either ls or wc command".....
please help! (1 Reply)
Discussion started by: lexicon
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I promise this is my very last dumb question.. but how to you count how many unique names you have.
My dataset is:
>Bac1
afdsgrr
>Bac4
egege
>Bac8
dgrjh
>Bac1
afdsgrr
>Bac1
afdsgrr
>Bac8
dgrjh
What i want to know is that how many unique names there is, so the output would... (3 Replies)
Discussion started by: Iifa
3 Replies
4. Shell Programming and Scripting
I have a large tab delimited text file with 10 columns
for example
chrM 412 A A 75 0 25 2 ..,AGAATt II
chrM 413 G G 72 0 25 4 ..t,,Aag IIIH
chrM 414 C C 75 0 25 4 ...a,.. III2
chrM 415 C T 75 75 25 4 TTTt,,,ATC III7
At... (4 Replies)
Discussion started by: Lucky Ali
4 Replies
5. Shell Programming and Scripting
I have a text file in the following format
CCCCCGCCCCCCCCCCcCCCCCCCCCCCCCCC
AAAATAAAAAAAAAAAaAAAAAAAAAAAAAAA
TGTTTTTTTTTTTTGGtTTTTTTTTTTTTTTT
TTTT-TTTTTTTTTCTtTTTTTTTTTTTTTTT
Each row/line will have 32 letters and each line will only have multiple occurrences of 2 letters out of a pool... (1 Reply)
Discussion started by: Lucky Ali
1 Replies
6. Shell Programming and Scripting
Hi,
The following output shows how many pmon process are started by users named : oracle or yoavb
$ ps -ef |grep pmon |grep -v grep |grep -v ipmon
oracle 11268 1 0 Sep 2 ? 36:00 ora_pmon_qerp
oracle 17496 1 0 Oct 11 ? 8:58 ora_pmon_bcv
oracle 15081 1 0 ... (5 Replies)
Discussion started by: yoavbe
5 Replies
7. Shell Programming and Scripting
Hi,
I want to count how many rows are in a file for a specific column.
eg.
K NM
K NM
K NM
K JK
K NM
K JK
K NM
so the file is tab-delimited. I want to count how many rows are in column 2 and how many NMs there are.
I used awk
awk '{OFS="\t"}; {count++} {print i,... (3 Replies)
Discussion started by: phil_heath
3 Replies
8. Shell Programming and Scripting
Hi all,
I am having problems counting commas (,) from a variable in shell scripting..
the variable contains similiar to: ID@NAME@DESCRIPTION,ID@NAME@DESCRIPTION, .....
It can go on and on..
So i need to count the number of sets i.e.( ID@NAME@DESCRIPTION is one set) and process the... (4 Replies)
Discussion started by: faelric
4 Replies
9. Shell Programming and Scripting
hi all,
i'm trying to pass a count of files to a variable thru these set of codes:
sh_count=$(ls -1 fnd_upload_LV*.* |wc -l)
problem is if no files matches that, it will give an error "ls: fnd_upload_LV*.*: No such file or directory".
how do i avoid having the shell script show that... (2 Replies)
Discussion started by: adshocker
2 Replies
10. Shell Programming and Scripting
Hi,
There is a variable f_name, it store some file names.
Value of f_name=a.sql b.sql c.sql.......
like this.
want to count how many file name the var f_name stores.
Without using loop is there any command to count that. (5 Replies)
Discussion started by: Dip
5 Replies