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
TETRIS(6) BSD Games Manual TETRIS(6)
NAME
tetris -- the game of tetris
SYNOPSIS
tetris [-ps] [-k keys] [-l level]
DESCRIPTION
The tetris command runs display-based game which must be played on a CRT terminal. The object is to fit the shapes together forming complete
rows, which then vanish. When the shapes fill up to the top, the game ends. You can optionally select a level of play, or custom-select
control keys.
The default level of play is 2.
The default control keys are as follows:
j move left
k rotate 1/4 turn counterclockwise
l move right
<space> drop
p pause
q quit
The options are as follows:
-k The default control keys can be changed using the -k option. The keys argument must have the six keys in order, and, remember to
quote any space or tab characters from the shell. For example:
tetris -l 2 -k 'jkl pq'
will play the default games, i.e. level 2 and with the default control keys. The current key settings are displayed at the bottom of
the screen during play.
-l Select a level of play.
-s Display the top scores.
-p Switch on previewing of the shape that will appear next.
PLAY
At the start of the game, a shape will appear at the top of the screen, falling one square at a time. The speed at which it falls is deter-
mined directly by the level: if you select level 2, the blocks will fall twice per second; at level 9, they fall 9 times per second. (As the
game goes on, things speed up, no matter what your initial selection.) When this shape ``touches down'' on the bottom of the field, another
will appear at the top.
You can move shapes to the left or right, rotate them counterclockwise, or drop them to the bottom by pressing the appropriate keys. As you
fit them together, completed horizontal rows vanish, and any blocks above fall down to fill in. When the blocks stack up to the top of the
screen, the game is over.
SCORING
You get one point for every block you fit into the stack, and one point for every space a block falls when you hit the drop key. (Dropping
the blocks is therefore a good way to increase your score.) Your total score is the product of the level of play and your accumulated points
-- 200 points on level 3 gives you a score of 600. Each player gets at most one entry on any level, for a total of nine scores in the high
scores file. Players who no longer have accounts are limited to one score. Also, scores over 5 years old are expired. The exception to
these conditions is that the highest score on a given level is always kept, so that following generations can pay homage to those who have
wasted serious amounts of time.
The score list is produced at the end of the game. The printout includes each player's overall ranking, name, score, and how many points
were scored on what level. Scores which are the highest on a given level are marked with asterisks ``*''.
FILES
/var/games/tetris.scores high score file
AUTHORS
Adapted from a 1989 International Obfuscated C Code Contest winner by Chris Torek and Darren F. Provine.
Manual adapted from the original entry written by Nancy L. Tinkham and Darren F. Provine.
Code for previewing next shape added by Hubert Feyrer in 1999.
BUGS
The higher levels are unplayable without a fast terminal connection.
BSD
May 31, 1993 BSD