02-18-2008
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If I wanted to redirect output to multiple log files, what would be the best way to do that?
echo "Unix is awesome" >>unixgod.log >>unixgod.log (3 Replies)
Discussion started by: darthur
3 Replies
2. Shell Programming and Scripting
Hi,
I want to move the output of a command/script to a file as well as to to be displayed on stdout.
Can anybody help me in this. Thanks in advace ..
-Chanakya M (1 Reply)
Discussion started by: Chanakya.m
1 Replies
3. Shell Programming and Scripting
Hello all,
I have the following 2 questions..
1) I would like to capture the output of an echo command to 2 different files at the same time. This does not seem to work. Any ideas?
echo ==== started on `date` ==== >> res1.log res2.log
2) Would it be possible to just get the 5th... (2 Replies)
Discussion started by: luft
2 Replies
4. Shell Programming and Scripting
Well, it didn't take me long to get stumped again. I assure you that I'm not mentally deficient, just new to scripting.
So, here's the gist. I want to redirect output from awk based off of which branch of an if-else statement under which it falls.
#!/bin/bash
#some variables... (2 Replies)
Discussion started by: mikesimone
2 Replies
5. Red Hat
hi,
how to write the resullt of execl() into another file.
i used
write(fd,execl()); (1 Reply)
Discussion started by: Mahendravarma
1 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I am interested in taking the output from a script i wrote and using it as input to a different script i wrote. So for example i want to take the output from program2 and use it as a parameter for program1. I didnt think i could use the >> symbols because i think that is just for .txt... (4 Replies)
Discussion started by: GmGeubt
4 Replies
7. Shell Programming and Scripting
For example,
if we run the below command,
symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools "... (2 Replies)
Discussion started by: web2moha
2 Replies
8. Post Here to Contact Site Administrators and Moderators
Hi All,
I am trying to redirect the grep output to multiple files, can you please help with that.
Below is the command im using to match my pattern
grep \<proxyType\>$PxyType $DIR/EndureFiles.json > File_Name*.json
Note : $DIR and $PxyType is already defined in my script
Im able... (0 Replies)
Discussion started by: Deena1984
0 Replies
9. Shell Programming and Scripting
Hi,
I have a following code in which I am unable to redirect to multiple files. Can anybody please help with some corrections
awk -F, '{ if ( substr($1,26,2)=="02" && substr($1,184,14)=="MTSCC_VALFIRST") {
array1++
array2++
array3++
}
else if (substr($1,26,2)=="03" &&... (4 Replies)
Discussion started by: siramitsharma
4 Replies
10. Shell Programming and Scripting
Hi All,
I am trying a shell script and need your help on taking the results to different output files.
I have tried the below code:
nawk '
{CNF = (length()-10)/7
printf "%9s", substr ($0, 1, 9)
for (i=0; i<=CNF; i++) T = substr ($0, 10+i*7, 7)
TMP = 100 - (T + T + T + T + T + T + T + T... (24 Replies)
Discussion started by: am24
24 Replies
LEARN ABOUT DEBIAN
robots
ROBOTS(6) BSD Games Manual ROBOTS(6)
NAME
robots -- fight off villainous robots
SYNOPSIS
robots [-Asjtan] [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 specified, that will be used instead of the standard file for scores.
The options are
-s Don't play, just show the score file.
-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.
-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.
-a Advance into the higher levels directly, skipping the lower, easier levels.
-A Auto-bot mode. Lets the game play itself.
-n Increase the number of games played by one.
AUTHOR
Ken Arnold Christos Zoulas (autobot mode)
FILES
/var/games/bsdgames/robots_roll the score file
BUGS
Bugs? You crazy, man?!?
BSD
May 31, 1993 BSD