03-23-2011
That made it more understandable .... thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to insert strings "0000 00" at the each line within the file.
The postion is 37 to 42.
ex.
name1 name2 0000 00
nam name 0000 00
The "0000 00" in two lines should be lined up.
I don't know why it's not lined up when I posted it.
Can anyone help? (14 Replies)
Discussion started by: whatisthis
14 Replies
2. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
3. Shell Programming and Scripting
Hi,
I have this input file called ttbitnres (which is catenated and sorted):-
8 0.4444 213
10 0.5555 342
11 0.5555 321
12 0.5555 231
13 0.4444 400
My code is at :-
#!/bin/bash
echo -e Version "\t" Number of Pass "\t" Number of Fail "\t" Rank Position "\t"Min "\t" Max... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
4. Shell Programming and Scripting
Hello,
I would like to find an efficient way to compare a pair of strings that differ at one position, and return the difference and position.
For example:
String1 123456789
String2 123454789
returning something - position 6, 6/4
Thanks in advance,
Mike (5 Replies)
Discussion started by: etherite
5 Replies
5. Shell Programming and Scripting
Hi,
I need to search for some strings in specific positions in a file.
If the strings: "foo1", "foo2" or "foo3" is on position 266 or position 288 in a file i want the whole line printed.
Any idea how to do it? (5 Replies)
Discussion started by: HugoH
5 Replies
6. Shell Programming and Scripting
Hi,
I have a file like
123
aaaaaaaaa
ddddddddd
vvvvvvvvv
345
ssssssssssss
dddddddddd
fffffffffff
dddd
ff
567
---------
sssssssss
ddddddd
eeeeeeeee (4 Replies)
Discussion started by: saltysumi
4 Replies
7. Shell Programming and Scripting
HI All,
am trying to find the position of space in a variable, it is working for other characters other than space
ulab="ulab1|ulab2"
find_pos=`expr index $ulab '|'`
echo $find_pos
above code worked fine but below one says syntax error
ulab="ulab ulab2"
find_pos=`expr index $ulab ' '`... (2 Replies)
Discussion started by: ulab
2 Replies
8. Shell Programming and Scripting
i have a requirement like this
if the line contains from position 294 to 299 is equal to "prabhu" ,then print entire line .
i want to use awk
awk '{if(substr(294-299) == 'prabhu') print "line" }' filename (1 Reply)
Discussion started by: ptappeta
1 Replies
9. UNIX for Dummies Questions & Answers
I am not an expert with linux, but following various posts on this forum, I have been trying to write a script to match pattern of charters occurring together in a file.
My file has approximately 200 million characters (upper and lower case), with about 50 characters per line. I have merged all... (5 Replies)
Discussion started by: biowizz
5 Replies
10. UNIX for Beginners Questions & Answers
I am using bash in Fedora 30
From the below lines (ls -l output), how can I print whatever is between the strings 'status_' and '.log'
$ ls -l | grep -i status
-rw-rw-r--. 1 sysadmin sysadmin 378530 Nov 11 21:58 status_vsbm1.log
-rw-rw-r--. 1 sysadmin sysadmin 428776 Nov 11 21:58... (8 Replies)
Discussion started by: kraljic
8 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