10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to collect some statistical results from a series of files that are being generated by other software. The files are tab delimited. There are 4 different sets of statistics in each file where there is a line indicating what the statistic set is, followed by 5 lines of values. It... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to write an awk function that returns all possible permutations of n items chosen in a list of m items. For example, given the input "a,b,c,d,e" and 3, the function should return the following :
a a a
a a b
a a c
a b a
a b b
...
c a a
c a b
...
e e c
e e d
e e e
(125... (21 Replies)
Discussion started by: cjnwl
21 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I need to filter my data based on items in column 23. Column 1 until column 23 are tab separated. This is how column 23 looks like:
PRIMARY=<0/1:504:499,5:.:.:.:0.01:1:15:.>
I want to extract lines if items 7 (separated by : ) in column 23 are more than 0.25 . In example above , item... (2 Replies)
Discussion started by: janshamsani
2 Replies
4. Shell Programming and Scripting
Probably a simple to this, but unsure how to do it. I would prefer an AWK solution. Below is the data set.
1 2 3
2 5 7
4 6 9
1 5 4
8 5 7
1 1 10
15 3 12
3 7 9
9 8 10
4 5 2
9 1 10
4 7 9
7 12 6
9 13 8
For the second... (11 Replies)
Discussion started by: mollydog11
11 Replies
5. Shell Programming and Scripting
ok, so a user can specify options as is shown below:
ExA:
cpu.pl!23!25!-allow
or
ExB:
cpu.pl!23!25!-block!all
options are delimited by the exclamation mark.
now, in example A, there are 4 options provided by the user.
in example B, there are 5 options provided by the user.
... (3 Replies)
Discussion started by: SkySmart
3 Replies
6. Shell Programming and Scripting
Hi,
I want to perform a task using shell script. I am new to awk programming and any help would be greatly appreciated.
I have the following 3 files (for example)
file1:
Name count Symbol
chr1_1_50 10 XXXX
chr3_101_150 30 YYYY
File2:
Name ... (13 Replies)
Discussion started by: Diya123
13 Replies
7. Shell Programming and Scripting
Hello, I'm writing a script in sh in which the first command line argument is a directory. from that, i'm suppose to count the number of readable, writable, and executable items in the directory. I know using $1 represents the directory, and ls would display all the items in the directory, and that... (4 Replies)
Discussion started by: kratos22
4 Replies
8. Shell Programming and Scripting
Hi All,
To start with, I have been reading this site for years, Unfortunately I do not consider myself versed well enough with scripts to provide useful help to others. The Blind cannot lead the Blind!
Many of you have provided me with brain food and solutions over the years without even... (4 Replies)
Discussion started by: Festus Hagen
4 Replies
9. Shell Programming and Scripting
I need "awk solution" for simple counting!
File looks like:
STUDENT GRADE
student1 A
student2 A
student3 B
student4 A
student5 B
Desired Output:
GRADE No.of Students
A 3
B 2
Thanks for awking! (4 Replies)
Discussion started by: saint2006
4 Replies
10. Shell Programming and Scripting
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Discussion started by: Ikon
4 Replies