9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
My files look like this
I need to remove the sequence GGGAAA and anything before that
I also need to remove the sequence AGCCCTA and anything after that
So I will end up with something like this
The left side is done but I cannot get the right side correctly. I would like to use... (3 Replies)
Discussion started by: Xterra
3 Replies
2. Shell Programming and Scripting
Hello
I have a text file with tens of thousands of rows
The format is
x y
where both x and y can be anything between -100 and +100.
What I would like to do is have a 3d gnuplot where there are 10,000 squared or bins and each bin will count how many rows have a value that would be... (1 Reply)
Discussion started by: garethsays
1 Replies
3. Shell Programming and Scripting
hi
i have some data like this
input:
1 apples oranges 234
2 oranges apples 2345
3 grapes bananas 1000000
4 melons banans 10000000
5 bananas apples 5000000
6 mangoes banans 2000000
7 apples bananas 1999999
i want to put all those which are coming between 1 and 999999 in to one bin... (8 Replies)
Discussion started by: anurupa777
8 Replies
4. Shell Programming and Scripting
Hi I need to trim white spaces from strings in a file.
Input file is like this:
1_rrc_CatalogGroups.csv = 607
1_rrc_Sales_TopCatalogGroups.csv = 4
1_rrc_Sales_CatalogEntries_CatalogGroup_Rel.csv = 7
Need to trim space before and after = symbol.
This is my script:
#!/usr/bin/ksh
... (2 Replies)
Discussion started by: sukhdip
2 Replies
5. Shell Programming and Scripting
I'm trying to parse an output log and I've managed to reduce the output to the lines I need. But I'm having trouble pulling out only the info I'm interested in. The output is 40+ lines and here is a sample
Installing AppFresh 0.8.5.pkg from ./InstallerFiles/CustomPKG/26 (26)
Installing... (2 Replies)
Discussion started by: kaltekar
2 Replies
6. Shell Programming and Scripting
Hi I have a file that I want to bin.
I am using this code:
awk -F'\t' -v r=40 '{for(i=r;i<=NF;i+=r){for(j=0;j<r;j++){sum+=$(i-j)}printf "%s ", sum/r;sum=0}; printf "\n"}' file1 > file2
So basically what this code does is that it will averaging every 40 columns (creating bins of 40). But... (2 Replies)
Discussion started by: phil_heath
2 Replies
7. Shell Programming and Scripting
Hi everyone!
Can you please help me with some shell scripting?
I have an input file input.txt
It has 3 columns (Time, Event, Value)
Time event Value
03:38:22 A 57
03:38:23 A 56
03:38:24 B 24
03:38:25 C 51
03:38:26 B 7
03:38:26 ... (7 Replies)
Discussion started by: Needhelp2
7 Replies
8. UNIX for Advanced & Expert Users
Hi,
I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself.
cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}'
ex:
10 xyz bc +00000234.4500
20 yzx foxic +002456.000
Expexted
10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies
9. Shell Programming and Scripting
Hi,
I am trying to find a script command that will let me trim leading and trailing space from a string. I have coded a SQL Select and sending the output to a file. Later I am parsing the file and reading each field. The problem is that each field uses the same size as the DB2 type it was defined... (2 Replies)
Discussion started by: fastgoon
2 Replies