04-09-2015
Wow! it works! Beautiful mind!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
Please help me if u have some solution.
I have a file with three columns separated by ':' -
INPUT_FILE
C416722_2 : calin Dirigent : Dirigent
AC4174_6 : Jac : cal_co
TC4260_5 : [no : lin kite
BC426302_1 : [no : calin Dirigent lin
JC426540_3 : lin Pymo_bin : calin
TC428_3 : no7... (4 Replies)
Discussion started by: sam_2921
4 Replies
2. Shell Programming and Scripting
Hi
I have file which contains 5 coulmns i need to add the fifth column value and put it in the desired location in the same column.
Here is the sample file..
ashop0004 SQL- 06/14/2009 06/14/2009 00:04:28 SUM
ashop0004 SQL- 06/14/2009 06/14/2009 00:00:37 ... (22 Replies)
Discussion started by: cutechaps
22 Replies
3. Shell Programming and Scripting
So I have this input
1 10327 rs112750067 T C . PASS DP=65;AF=0.208;CB=BC,NCBI
1 10469 rs117577454 C G . PASS DP=2055;AF=0.020;CB=UM,BC,NCBI
1 10492 rs55998931 C T . PASS DP=231;AF=0.167;CB=BC,NCBI
1 10583 rs58108140 G A ... (3 Replies)
Discussion started by: kellywilliams
3 Replies
4. Shell Programming and Scripting
Hola,
How can I add a column to a existing file??
PS: The column which should be added need to be the first column and it will be a parameter from the script.
Example:
1 name1
2 name2
3 name3
4 name3
Need to add parameter $file as a first column. $file is a file name with time... (6 Replies)
Discussion started by: Olivia
6 Replies
5. Shell Programming and Scripting
Hi, long time reader, first time poster.
I've done some searching so please if this is a repeated post excuse the duplicate, but what I have are two files roughly like so:
File 1:
A W
B X
C Y
D Z
File 2:
A 1
C 2
D 3
And what I would like to get out is... (4 Replies)
Discussion started by: wallysb01
4 Replies
6. Shell Programming and Scripting
Dear all,
Lets say, I've a file a.txt containing two columns, like
a1 b1
.. ..
.. ..
and another file b.txt containg two columns, like
a1 c1
.. ..
.. ..
I need to put c1 column from b.txt file to the a.txt file. So, the output should be
a1 b1 c1
.. .. ..
.. ... (4 Replies)
Discussion started by: mkg
4 Replies
7. Shell Programming and Scripting
Input File 1
cat S1.txt
MI0043 2731 miR-1
Input File 2
cat S4.txt
MI006 310 CiR-1
MI057 10 CiR-24
MI750 5 CiR-24
Desired Output File 1
cat S1.txt.out
MI0043 2731 miR-1 S1.txt
Desired Output File 2
cat S4.txt.out
MI006 310 CiR-1 S4.txt (3 Replies)
Discussion started by: perl_beginner
3 Replies
8. Shell Programming and Scripting
I have file like this
b,c
10,20
30,40
50,60
Now I want to add a new column a with fixed values for all the rows
a,b,c
60,10,20
60,30,40
60,50,60
Please let me know how can we do this in unix. (4 Replies)
Discussion started by: weknowd
4 Replies
9. Shell Programming and Scripting
Hi Team
I have file as below
empno,ename,sal
123,smith,1000
124,adams,2000
Required output: Using AWK
empno,ename,sal,deptno
123,smith,1000
124,adams,2000
Thanks,
Murali (5 Replies)
Discussion started by: bmk
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have 2 files.
file1 contains by lines: hash:salt:id
file2 contains by lines: username:hash:salt
I would like to add a new coloumn (id) form file1 to file2.
The new file should contains: username:hash:salt:id
Note: file1 contains less rows than file2.
I tried
paste -d':' file1... (12 Replies)
Discussion started by: freeroute
12 Replies
LEARN ABOUT NETBSD
battlestar
BATTLESTAR(6) BSD Games Manual BATTLESTAR(6)
NAME
battlestar -- a tropical adventure game
SYNOPSIS
battlestar [-r] [saved-file]
DESCRIPTION
battlestar is an adventure game in the classic style. However, it's slightly less of a puzzle and more a game of exploration. There are a
few magical words in the game, but on the whole, simple English should suffice to make one's desires understandable to the parser.
THE SETTING
In the days before the darkness came, when battlestars ruled the heavens...
Three He made and gave them to His daughters,
Beautiful nymphs, the goddesses of the waters.
One to bring good luck and simple feats of wonder,
Two to wash the lands and churn the waves asunder,
Three to rule the world and purge the skies with thunder.
In those times great wizards were known and their powers were beyond belief. They could take any object from thin air, and, uttering the
word 'su' could disappear.
In those times men were known for their lust for gold and desire to wear fine weapons. Swords and coats of mail were fashioned that could
withstand a laser blast.
But when the darkness fell, the rightful reigns were toppled. Swords and helms and heads of state went rolling across the grass. The entire
fleet of battlestars was reduced to a single ship.
SAMPLE COMMANDS
take --- take an object
drop --- drop an object
wear --- wear an object you are holding
draw --- carry an object you are wearing
put on --- take an object and wear it
take off -- draw an object and drop it
throw <object> <direction>
! <shell esc>
IMPLIED OBJECTS
>-: take watermelon
watermelon:
Taken.
>-: eat
watermelon:
Eaten.
>-: take knife and sword and apple, drop all
knife:
Taken.
broadsword:
Taken.
apple:
Taken.
knife:
Dropped.
broadsword:
Dropped.
apple:
Dropped.
>-: get
knife:
Taken.
Notice that the "shadow" of the next word stays around if you want to take advantage of it. That is, saying "take knife" and then "drop"
will drop the knife you just took.
SCORE & INVEN
The two commands ``score'' and ``inven'' will print out your current status in the game.
SAVING A GAME
The command ``save'' will save your game in a file called .Bstar in your home directory by default. You can recover a saved game by using
the -r option when you start up the game, or by giving the name of the saved file as an argument. Save files will be saved to and restored
from your home directory unless a path is specified - i.e., ``battlestar -r savedgame'' will look for savedgame in your home directory, but
``battlestar -r ./savedgame'' will look in the current directory. ``battlestar -r'' will look for the default file, .Bstar in your home
directory.
DIRECTIONS
The compass directions N, S, E, and W can be used if you have a compass. If you don't have a compass, you'll have to say R, L, A, or B,
which stand for Right, Left, Ahead, and Back. Directions printed in room descriptions are always printed in R, L, A, and B relative direc-
tions.
HISTORY
I wrote Battlestar in 1979 in order to experiment with the niceties of the C Language. Most interesting things that happen in the game are
hardwired into the code, so don't send me any hate mail about it! Instead, enjoy art for art's sake!
AUTHORS
David Riggle
INSPIRATION & ASSISTANCE
Chris Guthrie
Peter Da Silva
Kevin Brown
Edward Wang
Ken Arnold & Company
BUGS
Countless.
FAN MAIL
Send to edward%ucbarpa@berkeley.arpa, chris%ucbcory@berkeley.arpa, riggle.pa@xerox.arpa.
BSD
September 7, 2000 BSD