10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I'm back again looking for your precious help-
This time I need to merge two text files with matching two fields, output only common records with mixed output.
Let's look at the example:
FILE1
56153;AAA0708;3;TEST1TEST1;
89014;BBB0708;3;TEST2TEST2;
89014;BBB0708;4;TEST3TEST3;
... (7 Replies)
Discussion started by: emare
7 Replies
2. Shell Programming and Scripting
Hello,
I have a file such as this:
chr1
chr2
chr1
chr2
chr3
chr10
chr4
chr5
chrz
chr1AI want to sort it, I use this command:
sort -k1 -th -n testfilebut I get this output, how can I fix this?
chr1
chr1
chr10
chr1A
chr2
chr2 (3 Replies)
Discussion started by: Homa
3 Replies
3. Shell Programming and Scripting
Hi,
my data is like the subsequent snipped. Fieldseperator is TAB.
I can work the data well with awk, but the missing zero-numbers at the days column, for the days smaller 10 and the full hour-minutes i cant handle in the output.
2012 7 1 8 40 249.463 245.01 5.70448 6.11388 6.22125... (2 Replies)
Discussion started by: IMPe
2 Replies
4. Shell Programming and Scripting
Hi,
I would like to be able to parse out a substring matching a basic pattern, which is a character followed by 3 or 4 digits (for example S1234 out of a larger string). The main string would just be a filename, like Thisis__the FileName_S1234_ToParse.txt. The filename isn't fixed, but the... (2 Replies)
Discussion started by: keaneMB
2 Replies
5. Shell Programming and Scripting
Add 35 to the 3rd col (12000) in input if it is "+" and it will be 12035 in output.
Some thing like
awk '{if ($3==+) print $2,$3,$3+35,$1 else print $2,$3-35,$3,$1}'
+ abc1 12000
- abc2 10000
+ xyz1 11111
- vbcx 20036
+ xy_z 33333
output
abc1 ... (2 Replies)
Discussion started by: ruby_sgp
2 Replies
6. Shell Programming and Scripting
I have a file with the following content.
> cat /tmp/internetusage.txt
6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file.
awk '{ print $1/$2*100 }' /tmp/internetusage.txt
This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies
7. Shell Programming and Scripting
I get the same value "chinchwad" for the following 3 statements.
echo "ABCDchinchwad18-Mar-2010-11.sql.zip" | sed -r 's/(+)(+)(.*)/\2/'
echo "ABCDchinchwadII18-Mar-2010-11.sql.zip" | sed -r 's/(+)(+)(.*)/\2/'
echo "ABCDchinchwad918-Mar-2010-11.sql.zip" | sed -r 's/(+)(+)(.*)/\2/'
I expect:... (4 Replies)
Discussion started by: shantanuo
4 Replies
8. Shell Programming and Scripting
Howdy experts,
We have some ranges of number which belongs to particual group as below.
GroupNo StartRange EndRange
Group0125 935300 935399
Group2006 935400 935476
937430 937459
Group0324 935477 935549
... (6 Replies)
Discussion started by: thepurple
6 Replies
9. Shell Programming and Scripting
Hi...
I'm new here and i have a Q...
How do i get only the number from a string?
like from "rlvol11" i want to get 11
or from "lvol4" i want to get 4
what commands should i use at my script?
thanx 4 the help!
Eliraz. (13 Replies)
Discussion started by: eliraza6
13 Replies
10. Shell Programming and Scripting
This is my script. I am pulling the status of some hard where, but the status is in numerical form. The number 4 means Major and the 5 means Critical. In my script I would like to show the alarm type in aplha rather than numeric form. So if instead of seeing a 4 or 5 you would see MAjor or... (11 Replies)
Discussion started by: ja156194
11 Replies