Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to extract subset file from dataset? Post 302850327 by sajmar on Wednesday 4th of September 2013 01:38:18 PM
Old 09-04-2013
Quote:
Originally Posted by Corona688
The output file was not included in my instructions, for the reason that it would be empty. It doesn't use it.

Check for the files 'M' and 'F' in the same directory, they will not be empty.
When I run the program I had M, F file but there is just one line.
What I have in my data set is more lines than the example. I have 2600 lines which contains M and F which are genders. What I want is how to separate 2 files from the data set in 2 file that have separate gender M and gender F.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Total file size of a subset list

Hello! I'm trying to find out the total file size of a subset list in a directory. For example, I do not need to know the total file size of all the files in a directory, but I need to know what the total size is of say, "ls -l *FEB08*" in a directory. Is there any easy way of doing this? ... (3 Replies)
Discussion started by: tekster757
3 Replies

2. Shell Programming and Scripting

How to extract a subset from a huge dataset

Hi, All I have a huge file which has 450G. Its tab-delimited format is as below x1 A 50020 1 x1 B 50021 8 x1 C 50022 9 x1 A 50023 10 x2 D 50024 5 x2 C 50025 7 x2 F 50026 8 x2 N 50027 1 : : Now, I want to extract a subset from this file. In this subset, column 1 is x10, column 2 is... (3 Replies)
Discussion started by: cliffyiu
3 Replies

3. Shell Programming and Scripting

Count the number of words in some subset of file and disregard others

Hi All, I have some 6000 text files in a directory. My files are named like 1.txt, 2.txt 3.txt and so on until 6000.txt. I want to count the "number of words" in only first 3000 of them. Any suggestions? I know wc -w can count the number of words in a text file. I am using Red Hat Linux. (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

4. Solaris

flarecreate for zfs root dataset and ignore multiple dataset

Hi All, I want to write a script to create flar images on multiple servers. In non zfs filesystem I am using -X option to refer a file to exclude mounts on different servers. but on ZFS -X option is not working. I want multiple mounts to be ignore on ZFS base system during flarecreate. I... (0 Replies)
Discussion started by: uxravi
0 Replies

5. Shell Programming and Scripting

How to remove a subset of data from a large dataset based on values on one line

Hello. I was wondering if anyone could help. I have a file containing a large table in the format: marker1 marker2 marker3 marker4 position1 position2 position3 position4 genotype1 genotype2 genotype3 genotype4 with marker being a name, position a numeric... (2 Replies)
Discussion started by: davegen
2 Replies

6. UNIX for Dummies Questions & Answers

how to get a subset of such a file

Dear all, I have a file lik below: n of row=420, n of letters in each row=100000 like below: there is no space between the letters. what I want is: the 75000th letter to the 85000th letter in each row. how to do that? thanks a lot! ... (2 Replies)
Discussion started by: forevertl
2 Replies

7. UNIX for Dummies Questions & Answers

Swapping the columns of a text file for a subset of rows

Hi, I'd like to swap the columns 1 and 2 of a space-delimited text file but only for the first 1000 rows. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. UNIX for Dummies Questions & Answers

Random selection of subset of sample from file

Hello Could you please help me to find a code that can randomly select 1224 lines from a file of 12240 and make tn output with 1224 line each. my input is txt file with 12240 lines like : 13474 999003507 0 0 2 -9 13475 999003508 0 0 2 -9 13476 999003509 0 0 1 -9 13477 999003510 0 0 1 -9 ... (7 Replies)
Discussion started by: biopsy
7 Replies

9. Shell Programming and Scripting

Creating subset of a file based on specific columns

Hello Unix experts, I need a help to create a subset file. I know with cut comand, its very easy to select many different columns, or threshold. But here I have a bit problem as in my data file is big. And I don't want to identify the column numbers or names manually. I am trying to find any... (7 Replies)
Discussion started by: smitra
7 Replies

10. Shell Programming and Scripting

awk to filter file using another working on smaller subset

In the below awk if I use the attached file as the input, I get no results for TCF4. However, if I just copy that line from the attached file and use that as input I get results for TCF4. Basically the gene file is a 1 column list that is used to filter $8 of the attached file. When there is a... (9 Replies)
Discussion started by: cmccabe
9 Replies
SLASHEM(6)							   Games Manual 							SLASHEM(6)

NAME
slashem - Exploring The Mazes of Menace SYNOPSIS
slashem [ -d directory ] [ -n ] [ -p profession (role) ] [ -r race ] [ -g gender ] [ -a alignment ] [ -[DX] ] [ -u playername ] [ -dec ] [ -ibm ] slashem [ -d directory ] -s [ -v ] [ -p profession (role) ] [ -r race ] [ -g gender ] [ -a alignment ] [ maxrank ] [ playernames ] DESCRIPTION
SLASH'EM is a display oriented Dungeons & Dragons(tm) - like game. The standard tty display and command structure resemble rogue. It is an extension of SLASH which is an extension of NetHack. 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, SLASH'EM 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 SLASHEMOPTIONS 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 .slashemrc on Unix systems. On other systems, the default may be dif- ferent, usually SLASHEM.cnf. On DOS or Windows, the name is defaults.nh, while on the Macintosh or BeOS, it is SlashEM Defaults. The con- figuration file's location may be specified by setting SLASHEMOPTIONS 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, -g gender the gender of the chareacter and finally -a alignment to chose the alignment of the character. Leaving out any of these characteristics will result in you being prompted during the game startup for the information. Instead of chosing the above separately you can add them as suffixes to the playername: -u playername-race-gender-alignment 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 be also be followed by player type arguments ( -p , -r , -g and -a ) to print the scores of particu- lar types of players 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/local/slashemdir). 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. Tom Proudfoot took NetHack and rendered it into SLASH - SuperLotsaAddedStuffHack, adding more character classes, levels monsters and all manner of changes. Warren Cheung took SLASH and rendered it into SLASHEM - SuperLotsaAddedStuffHack - Extended Magic, with more improvements to the bloated behemoth. FILES
All files are in the playground, normally /usr/local/slashemdir. 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. slashem The program itself. data, oracles, rumors Data files used by SLASH'EM. 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 SLASH'EM. 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 /bin/mail or /usr/ucb/mail). NETHACKDIR Playground. SLASHEMOPTIONS String predefining several SLASH'EM 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 24 March 2002 SLASHEM(6)
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy