10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
File1 consist two columns, first some weired ids and second the numbers
t|v203.1@t|k88711.1 0.1
t|v190.1@t|k90369.1 0.01
t|v203.1@t|k88711.1 0.5
t|v322.1@t|k88711.1 0.2
t|v207.1@t|k90369.1 0.11
t|v326.1@t|k85939.1 0.5
t|v207.1@t|k90369.1 0.7
t|v207.1@t|k90369.1 0.3
t|v326.1@t|k89421.1 0.33... (3 Replies)
Discussion started by: ashmit99
3 Replies
2. Shell Programming and Scripting
Hi
cat /tmp/xx.txt
1 4
1 5
1 6
2 1
2 1
2 1
i want to add the values of 2nd column resepect to 1st column values..for 1 in 1st column i need sum of all the values in 2nd column ..pls tell me hw to do it?? (8 Replies)
Discussion started by: Aditya.Gurgaon
8 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
I need your help for my question please
I have without header (space separated) and need to add two colomns at the beginning with values
my file look like :
rs1 a t 0.6
rs2 a c 0.3
rs3 t g 0.8
I need to a new file like:
1 100 rs1 a t 0.6
1 100 rs2 a c 0.3
1 100 rs3 t g... (3 Replies)
Discussion started by: biopsy
3 Replies
4. Shell Programming and Scripting
Hi Folks
I wanted to do something like this :
Go through all the top_level_dirs inside a particular dir.
Grep a particular string in the files in each of those dirs.
Count the occurence of that string in that file
Keep adding these (wc) values so that I can know the total occurences of that... (1 Reply)
Discussion started by: abcdino
1 Replies
5. Shell Programming and Scripting
Hi,
test.txt contains below values
1
2
3
4
5
Desired output:
'TT.1',
'TT.2',
'TT.3',
'TT.4',
'TT.5'
Last value should not contain the comma after the value. Below is the script which i have tried. I'm using Linux.
#!/bin/bash
for i in $test.txt (4 Replies)
Discussion started by: venkatesht
4 Replies
6. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
7. Shell Programming and Scripting
I am needing to create a variable(changing) and assign it a value(changing) ... I am using C-Shell..
Example:
foreach account in ($Accountlist)
set account_connect = "$account/$account_pass"
end
I want to make set account_connect to store various values ? $account_connect did not... (3 Replies)
Discussion started by: shafi2all
3 Replies
8. Shell Programming and Scripting
I have the following script in a shell
# The start of a filename
file=$(ls -tr $EMT*.dat | tail -1) # Select the latest file echo $file
file_seq=$( < /u02/sct/banner/bandev2/xxxxxx/misc/EFTSQL.dat)
echo $file_seq
file2 = '$file_seq + 1'
echo $file2
It is reading a file EFTSQL.dat... (3 Replies)
Discussion started by: rechever
3 Replies
9. Shell Programming and Scripting
I have two files as Count1 and Count2. The count contains only one values as 10 and count2 contains only one
values as 20. Now I want third file Count3 as count1+Count2. That is it should contain sum of two file(10+20=30) (3 Replies)
Discussion started by: Shell_Learner
3 Replies
10. Shell Programming and Scripting
Hi there, I am checking disk spaced used on a box
# df -k | grep dsk | awk {'print $3'}
2055463
20165785
18310202
32274406
I want to somehow add them up but am no quite sure how to do this in a loop. ...i.e
for n in 'df -k | grep dsk | awk {'print $3}'
do
<some adding... (1 Reply)
Discussion started by: hcclnoodles
1 Replies