Sponsored Content
Full Discussion: Those simple one liners
The Lounge What is on Your Mind? Those simple one liners Post 302793493 by Corona688 on Friday 12th of April 2013 12:39:39 PM
Old 04-12-2013
Quote:
Originally Posted by MadeInGermany
Yep, it's already a bad habit to replace an unconditional {print} with 1.
That's an important part of how the language works, though, and used for a lot more than an implied 'print'. It's not a hack, any more than FS is a hack -- neither of them are things which people will understand unless explained.
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

invaluable resource for shell one liners and more

Hi all, This link might help whom is seeking a quick solutions for thier daily shell needs. linkAll commands | commandlinefu.com (1 Reply)
Discussion started by: h@foorsa.biz
1 Replies

2. Shell Programming and Scripting

awk - one liners

Guys, I have a requirement like this. A file has >5K records always. Separated by "|", it has 30 fields for each line. In some lines, I am getting an odd field. say, the 15th field is supposed to be 2 characters but comes in as >2. In this case, for resolving this I need to copy the value of... (6 Replies)
Discussion started by: PikK45
6 Replies

3. Shell Programming and Scripting

awk one liners into a nice script

Hi All, I got some awk one liners, how can i split it all into a nice script? Got these: gzcat capgw0.log-201308161376632741.gz | sed -n '/2013-08-16 05:56:/,/2013-08-16 05:58:/p' > timebased.log awk -F":|," 'FNR==NR && /INFO - AId:/ {a=$0;next} END {for (i in a) print i "|" a}'... (8 Replies)
Discussion started by: batka
8 Replies

4. What is on Your Mind?

One liners, quick rant...

Hi fellas and fella-esses... There are numerous threads on here where people ask for, and often expect, solutions to difficult problems solved using _one_liners_. Why do they insist as such when it is virtually no different in execution time with well thought out indented code? Is it me... (12 Replies)
Discussion started by: wisecracker
12 Replies
HACK(6) 							   Games Manual 							   HACK(6)

NAME
hack - Exploring The Dungeons of Doom SYNOPSIS
/usr/games/hack [ -d directory ] [ -n ] [ -u playername ] /usr/games/hack [ -d directory ] -s [ -X ] [ playernames ] DESCRIPTION
Hack is a display oriented dungeons & dragons - like game. Both display and command structure resemble rogue. (For a game with the same structure but entirely different display - a real cave instead of dull rectangles - try Quest.) To get started you really only need to know two commands. The command ? will give you a list of the available commands and the command / will identify the things you see on the screen. To win the game (as opposed to merely playing to beat other people high scores) you must locate the Amulet of Yendor which is somewhere below the 20th level of the dungeon and get it out. Nobody has achieved this yet and if somebody does, he will probably go down in history as a hero among heros. When the game ends, either by your death, when you quit, or if you escape from the caves, hack will give you (a fragment of) the list of top scorers. The scoring is based on many aspects of your behaviour but a rough estimate is obtained by taking the amount of gold you've found in the cave plus four times your (real) experience. Precious stones may be worth a lot of gold when brought to the exit. There is a 10% penalty for getting yourself killed. The administration of the game is kept in the directory specified with the -d option, or, if no such option is given, in the directory specified by the environment variable HACKDIR, or, if no such variable exists, in the current directory. This same directory contains sev- eral auxiliary files such as lockfiles and the list of topscorers and a subdirectory save where games are saved. The game administrator may however choose to install hack with a fixed playing ground, usually /usr/games/lib/hackdir. The -n option suppresses printing of the news. The -u playername option supplies the answer to the question "Who are you?". When playername has as suffix one of -T -S -K -F -C -W then this supplies the answer to the question "What kind of character ... ?". The -s option will print out the list of your scores. It may be followed by arguments -X where X is one of the letters C, F, K, S, T, W to print the scores of Cavemen, Fighters, Knights, Speleologists, Tourists or Wizards. It may also be followed by one or more player names to print the scores of the players mentioned. AUTHORS
Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote the original hack, very much like rogue (but full of bugs). Andries Brouwer continuously deformed their sources into the current version - in fact an entirely different game. FILES
hack The hack program. data, rumors Data files used by hack. help, hh Help data files. record The list of topscorers. save A subdirectory containing the saved games. bones_dd Descriptions of the ghost and belongings of a deceased adventurer. xlock.dd Description of a dungeon level. safelock Lock file for xlock. record_lock Lock file for record. ENVIRONMENT
USER or LOGNAME Your login name. HOME Your home directory. SHELL Your shell. TERM The type of your terminal. HACKPAGER, PAGER Pager used instead of default pager. MAIL Mailbox file. MAILREADER Reader used instead of default (probably /bin/mail or /usr/ucb/mail). HACKDIR Playground. HACKOPTIONS String predefining several hack options (see help file). Several other environment variables are used in debugging (wizard) mode, like GENOCIDED, INVENT, MAGIC and SHOPTYPE. BUGS
Probably infinite. Mail complaints to mcvax!aeb . 4th Berkeley Distribution 31 March 1985 HACK(6)
All times are GMT -4. The time now is 05:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy