10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I would like to know how can I get a mean score value by ID over a defined genomic region. Here it is an example:
file1
12 100 103 id1
12 110 112 id1
12 200 203 id2
file2
12 100 101 1
12 101 102 0.8
12 102 103 0.7
12 110 111 2.5
12 111 112 2.8
12 200 201 10.1
12 201 202... (7 Replies)
Discussion started by: fadista
7 Replies
2. Shell Programming and Scripting
awk '{if(len==0){last=$4;total=$6;len=1;getline}if($4!=last){printf("%s\t%f\n", last, total/len);last=$4;total=$6;len=1}else{total+=$6;len+=1}}END{printf("%s\t%f\n", last, total/len)}' exon.txt > output.txt
In the attached file I am just trying to group all the same names in column $4 and then... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
Dear All,
I have the following file tabulated:
ID distanceTSS score
8434 571269 10
10122 393912 9
7652 6 10
4863 1451 9
8419 39 2
9363 564 21
9333 7714 22
9638 8334 9
1638 1231 11
10701 918 1000
6587 32056 111
What I would like to do is the following, create 100 new files based... (5 Replies)
Discussion started by: paolo.kunder
5 Replies
4. UNIX for Advanced & Expert Users
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
6. Fedora
Hi,
I run Fedora 17.
I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies
7. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
8. UNIX for Advanced & Expert Users
Hello, I'm searching for a proper way to let the kernel space ISR(implemented in a kernel module) wake up a user space thread on a hardware interrupt.
Except for sending a real-time signal, is it possible to use a semaphore?
I've searched it on google, but it seems impossible to share a... (0 Replies)
Discussion started by: aaronwong
0 Replies
9. Shell Programming and Scripting
What I thought would be an extremely simple project has proven more difficult for me than I thought. Here are the parameters:
Thus far, I've been able to sort the final grades, but I'm having a lot of trouble with appending the correlating letter grade to the end of each line. Any help would be... (3 Replies)
Discussion started by: lazypeterson
3 Replies
10. Shell Programming and Scripting
Hi guys,
Please guide for Solution.
PART-I
INPUT FILE (has 2 columns ID and score)
TC5584_1 93.9
DV161411_2 79.5
BP132435_5 46.8
EB682112_1 34.7
BP132435_4 29.5
TC13860_2 10.1
OUTPUT FILE (It shudn't contain the line ' BP132435_4 29.5 ' as BP132435 is repeated... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies
ROBOTS(6) BSD Games Manual ROBOTS(6)
NAME
robots -- fight off villainous robots
SYNOPSIS
robots [-Aajnrst] [maximum] [scorefile]
DESCRIPTION
robots pits you against evil robots, who are trying to kill you (which is why they are evil). Fortunately for you, even though they are
evil, they are not very bright and have a habit of bumping into each other, thus destroying themselves. In order to survive, you must get
them to kill each other off, since you have no offensive weaponry.
Since you are stuck without offensive weaponry, you are endowed with one piece of defensive weaponry: a teleportation device. When two ro-
bots run into each other or a junk pile, they die. If a robot runs into you, you die. When a robot dies, you get 10 points, and when all
the robots die, you start on the next field. This keeps up until they finally get you.
Robots are represented on the screen by a '+', the junk heaps from their collisions by a '*', and you (the good guy) by a '@'.
The commands are:
h move one square left
l move one square right
k move one square up
j move one square down
y move one square up and left
u move one square up and right
b move one square down and left
n move one square down and right
. (also space) do nothing for one turn
HJKLBNYU
run as far as possible in the given direction
> do nothing for as long as possible
t teleport to a random location
w wait until you die or they all do
q quit
^L redraw the screen
All commands can be preceded by a count.
If you use the 'w' command and survive to the next level, you will get a bonus of 10% for each robot which died after you decided to wait.
If you die, however, you get nothing. For all other commands, the program will save you from typos by stopping short of being eaten. How-
ever, with 'w' you take the risk of dying by miscalculation.
Only five scores are allowed per user on the score file. If you make it into the score file, you will be shown the list at the end of the
game. If an alternative score file is named on the command line, that file will be used instead of the standard file for scores. The score
file must be created empty beforehand, e.g. with touch(1). If the argument maximum, which must be a number, is provided when a score file is
first used, the value given will be used as the maximum number of scores to keep per user instead of the default five. This value is a prop-
erty of the score file and cannot be changed later.
The options are
-A Auto-bot mode. Lets the game play itself.
-a Advance into the higher levels directly, skipping the lower, easier levels.
-j Jump, i.e., when you run, don't show any intermediate positions; only show things at the end. This is useful on slow terminals.
-n Increase the number of games played by one; that is, automatically choose to play again one time per usage of this option.
-r Play in real time; that is, if you do nothing for a few seconds the game will assume you meant to do nothing and move the robots.
-s Don't play, just show the score file.
-t Teleport automatically when you have no other option. This is a little disconcerting until you get used to it, and then it is very
nice.
FILES
/var/games/robots_roll The score file.
AUTHORS
Ken Arnold
Christos Zoulas (autobot mode)
BUGS
Bugs? You crazy, man?!?
BSD
August 4, 2009 BSD