Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to cat a file , name starts with "-" ? Post 43356 by kduffin on Sunday 16th of November 2003 08:06:32 AM
Old 11-16-2003
Not a special character per say, but it is what is used to identify option flags at the CLI. -- is used to denote an end of all option flags. Congrats on having found the answer yourself before hand. I have always found great satisfaction in problem solving and creative thinking. UNIX and other such appendages provide a good playground for such activities.

Cheers,
Keith

Last edited by kduffin; 11-17-2003 at 10:28 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep/cat/more -- search in a txt file and display content from a specific "keyword"

Hi, I have a .txt file Sample: ===================== NEXT HOST ===================== AEADBAS001 ip access-list extended BLA_Incoming_Filter ip access-list extended BLA_Outgoing_Filter access-list 1 permit xxxxxxxxxxxxxx access-list 2 permit xxxxxxxxxxxxxx =====================... (4 Replies)
Discussion started by: I-1
4 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Cat Command on File not printing "Blank" Lines?

Hello All, I have a bash script and in it at some point I call an Expect Script that does some stuff and saves its output in a ".txt" file. Example "/path/to/my/file/Expect_Output.txt" file: notice the 2nd line is empty in the file... Data for Host-1 (192.168.1.110) Checking the... (2 Replies)
Discussion started by: mrm5102
2 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Renaming a file that starts with "-"

Hi I am downloading some files from the Internet. They are from different sources and they are all called -.txt that is: a dash "-" followed by a dot "." and then the file extension. So i wrote a small script that hoped will downloads the first file and then rename them once they are... (10 Replies)
Discussion started by: faizlo
10 Replies

8. Shell Programming and Scripting

Bash script: "mkdir -p" doesn't work with var(cat x)

Hello, :) I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output : #!/bin/bash # PATHS HOME_BACKUP="/home/backup" HOME_SCRIPT="/home/scripts/test/backup_server" TARGET="/var/www" # DATE DATE_Ymd=$(date +%Y-%m-%d) #... (1 Reply)
Discussion started by: Arnaudh78
1 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
NETHACK(6)							   Games Manual 							NETHACK(6)

NAME
nethack - Exploring The Mazes of Menace SYNOPSIS
nethack [ -d directory ] [ -n ] [ -p profession (role) ] [ -r race ] [ -[DX] ] [ -u playername ] [ -dec ] [ -ibm ] nethack [ -d directory ] -s [ -v ] [ -p profession (role) ] [ -r race ] [ playernames ] DESCRIPTION
NetHack is a display oriented Dungeons & Dragons(tm) - like game. The standard tty display and command structure resemble rogue. Other, more graphical display options exist if you are using either a PC, or an X11 interface. To get started you really only need to know two commands. The command ? will give you a list of the available commands (as well as other information) 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's 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; anybody who does will probably go down in history as a hero among heros. When the game ends, whether by your dying, quitting, or escaping from the caves, NetHack will give you (a fragment of) the list of top scorers. The scoring is based on many aspects of your behavior, 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 environment variable NETHACKOPTIONS can be used to initialize many run-time options. The ? command provides a description of these options and syntax. (The -dec and -ibm command line options are equivalent to the decgraphics and ibmgraphics run-time options described there, and are provided purely for convenience on systems supporting multiple types of terminals.) Because the option list can be very long (particularly when specifying graphics characters), options may also be included in a configura- tion file. The default is located in your home directory and named .nethackrc on Unix systems. On Debian systems, use .nethackrc.gnome for the Gnome windowing port, use .nethackrc.x11 for the X11 windowing port, and use .nethackrc.qt for the QT windowing port. You can use .nethackrc.tty for the non-graphical version. The configuration file's location may be specified by setting NETHACKOPTIONS to a string consisting of an @ character followed by the filename. The -u playername option supplies the answer to the question "Who are you?". It overrides any name from the options or configuration file, USER, LOGNAME, or getlogin(), which will otherwise be tried in order. If none of these provides a useful name, the player will be asked for one. Player names (in conjunction with uids) are used to identify save files, so you can have several saved games under different names. Conversely, you must use the appropriate player name to restore a saved game. A playername suffix can be used to specify the profession, race, alignment and/or gender of the character. The full syntax of the player- name that includes a suffix is "name-ppp-rrr-aaa-ggg". "ppp" are at least the first three letters of the profession (this can also be specified using a separate -p profession option). "rrr" are at least the first three letters of the character's race (this can also be specified using a separate -r race option). "aaa" are at last the first three letters of the character's alignment, and "ggg" are at least the first three letters of the character's gender. Any of the parts of the suffix may be left out. -p profession can be used to determine the character role. You can specify either the male or female name for the character role, or the first three characters of the role as an abbreviation. -p @ has been retained to explicitly request that a random role be chosen. It may need to be quoted with a backslash (@) if @ is the "kill" character (see "stty") for the terminal, in order to prevent the current input line from being cleared. Likewise, -r race can be used to explicitly request that a race be chosen. Leaving out any of these characteristics will result in you being prompted during the game startup for the information. The -s option alone will print out the list of your scores on the current version. An immediately following -v reports on all versions present in the score file. The -s may also be followed by arguments -p and -r to print the scores of particular roles and races only. It may also be followed by one or more player names to print the scores of the players mentioned, by 'all' to print out all scores, or by a number to print that many top scores. The -n option suppresses printing of any news from the game administrator. The -D or -X option will start the game in a special non-scoring discovery mode. -D will, if the player is the game administrator, start in debugging (wizard) mode instead. The -d option, which must be the first argument if it appears, supplies a directory which is to serve as the playground. It overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation (usually /usr/lib/games/nethack). This option is usually only useful to the game administrator. The playground must contain several auxiliary files such as help files, the list of top scorers, and a subdirectory save where games are saved. 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 an entirely different game. Mike Stephenson has continued the perversion of sources, adding various warped character classes and sadistic traps with the help of many strange people who reside in that place between the worlds, the Usenet Zone. A number of these miscreants are immortalized in the histori- cal roll of dishonor and various other places. The resulting mess is now called NetHack, to denote its development by the Usenet. Andries Brouwer has made this request for the distinc- tion, as he may eventually release a new version of his own. FILES
All files are in the playground, normally /usr/lib/games/nethack. If DLB was defined during the compile, the data files and special levels will be inside a larger file, normally nhdat, instead of being separate files. nethack The program itself. data, oracles, rumors Data files used by NetHack. options, quest.dat More data files. help, hh Help data files. cmdhelp, opthelp, wizhelp More help data files. *.lev Predefined special levels. dungeon Control file for special levels. history A short history of NetHack. license Rules governing redistribution. record The list of top scorers. logfile An extended list of games played. xlock.nnn Description of a dungeon level. perm Lock file for xlock.dd. bonesDD.nn Descriptions of the ghost and belongings of a deceased adventurer. save A subdirectory containing the saved games. ENVIRONMENT
USER or LOGNAME Your login name. HOME Your home directory. SHELL Your shell. TERM The type of your terminal. HACKPAGER or PAGER Replacement for default pager. MAIL Mailbox file. MAILREADER Replacement for default reader (probably /usr/bin/mail). NETHACKDIR Playground. NETHACKOPTIONS String predefining several NetHack options. In addition, SHOPTYPE is used in debugging (wizard) mode. SEE ALSO
dgn_comp(6), lev_comp(6), recover(6) BUGS
Probably infinite. Dungeons & Dragons is a Trademark of Wizards of the Coast, Inc. 4th Berkeley Distribution 9 August 2002 NETHACK(6)
All times are GMT -4. The time now is 11:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy