Sponsored Content
Full Discussion: get few words from same line
Top Forums Shell Programming and Scripting get few words from same line Post 302582623 by uniqme on Friday 16th of December 2011 02:47:36 PM
Old 12-16-2011
Code:
cat s1.txt
@@XYMONDCHK-V1|.acklist.|developer_instead|rendy_google_yagom|1323977582|1323979382|1323979382|1|admin|test case

 cat s1.txt | tr '|' '\n'
@@XYMONDCHK-V1
.acklist.
developer_instead
rendy_google_yagom
1323977582
1323979382
1323979382
1
admin
test case


Last edited by Franklin52; 12-19-2011 at 03:28 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

seperating the words from a line??

The line is like this +abc+def+mgh+ddsdsd+sa i.e. words seperated by +. There is a plus in the beginning. i want to conver this line to abc, def, mgh, ddsdsd, sa please provide the logic in the form of a shell script Thanks in advance (3 Replies)
Discussion started by: skyineyes
3 Replies

2. Shell Programming and Scripting

count no of words in a line

hi i have a string like str=abc def ghi jkl now i want to count the no of words in the string please help (7 Replies)
Discussion started by: satish@123
7 Replies

3. Shell Programming and Scripting

how to get line number of different words if exists in same line

I have some txt files. I have to create another text file which contains the portion starting from the format "Date Sex Address" to the end of the file. While using grep -n on Date it also gives me the previous line containg Date. and also Date may be DATE in some files. My file is like this... (10 Replies)
Discussion started by: Amiya Rath
10 Replies

4. Shell Programming and Scripting

print only last two words of a line

can u help me out to print last two words of each sentence of a file. for example. contents of input file: i love songs my favourite songs sent songs all kind good buddy Ouput file should contain: love songs favourite songs sent all kind good buddy (5 Replies)
Discussion started by: pradeepreddy
5 Replies

5. Shell Programming and Scripting

count no of words in a line

hi i have a line "abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc" I want to print the no of words, words separated by comma please help (3 Replies)
Discussion started by: Satyak
3 Replies

6. Shell Programming and Scripting

How to print the words in the same line with space or to the predefined line?

HI, cat test abc echo "def" >> test output is cat test abc def the needed output is cat test abc def and so on (5 Replies)
Discussion started by: jobycxa
5 Replies

7. Shell Programming and Scripting

Copying x words from end of line to specific location in same line

Hello all i know it is pretty hard one but you will manage it all after noticing and calculating i find a rhythm for the file i want to edit to copy the last 12 characters in line but the problem is to add after first 25 characters in same line in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies

8. Shell Programming and Scripting

Unique words in each line

In each row there could be repetition of a word. I want to delete all repetitions and keep unique occurrences. Example: a+b+c ab+c ab+c abbb+c ab+bbc a+bbbc aaa aaa aaa Output: a+b+c ab+c abbb+c ab+bbc a+bbbc aaa (6 Replies)
Discussion started by: Viernes
6 Replies

9. Shell Programming and Scripting

Search words in multiple file line by line

Hi All I have to search servers name say like 1000+ "unique names" line by line in child.txt files in another file that is a master file where all server present say "master.txt",if child.txt's server name matches with master files then it print yes else no with server name. (4 Replies)
Discussion started by: netdbaind
4 Replies

10. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
REALMINIT(1p)						User Contributed Perl Documentation					     REALMINIT(1p)

NAME
realminit - Create new realm records for a DNSSEC-Tools realms file. SYNOPSIS
realminit [options] <realm1> ... <realmN> DESCRIPTION
realminit creates new realm entries for a realms file. dtrealms manages multiple distinct DNSSEC-Tools rollover environments running simultaneously. Each rollover environment, called a realm, is defined in a realms file. dtrealms uses this file to determine how to run the rollover environment. This is useful for such things as managing very large collections of zones, segregating customer zones, and software tests. The newly generated realm entries are written to standard output, unless the -out option is specified. A realms file contains a number of entries, one for each managed realm. A realm entry has this format: realm "example" state "active" configdir "/usr/realms/configs/example" statedir "/usr/realms/states/example" realmsdir "/usr/realms/realms-files/example" rollrec "example.rrf" administrator "bob@cat.example.com" display "1" manager "rollerd" args "-display -loglevel phase" Multiple realm entries may be created with a single execution of realminit. Except for the entry's name field, the entries will be exactly the same unless the '=' metacharacter is used in the command-line options. If the values of the configdir, statedir, realmdir, rollrec, administrator, args, or user options contain an '=', then it will be replaced with the realm's name when building the entry. See the EXAMPLES section for examples of how options are used by realminit. OPTIONS
realminit may be given the following options: -active This indicates that dtrealms should start the realm when dtrealms starts. realms are active by default. -administrator This is the email address for the realm's administrator. -args This is a set of command-line arguments passed to the realm's rollover manager when the realm is started. -configdir This is the realm's configuration directory. This will contain such files as the DNSSEC-Tools configuration file for that realm. -display This indicates if the realm should be included in grandvizier output. -inactive This indicates that dtrealms should not start the realm when dtrealms starts. -manager This is the rollover manager for the realm. rollerd is the default rollover manager, but other managers may be used. -out output-file The new realm entries will be appended to output-file. The file will be created if it does not exist. If this option is not given, the new rollrec entries will be written to standard output. -realmdir This is the realm's data directory. This directory is expected to contain the rollrec file, zone files, keyrec files, and key files for the zones in that realm. -rollrec This is the path to the realm's rollrec file. This is used to control rollover actions for the realm. If it is not an absolute path, it will be assumed to be relative to the realmdir field. -statedir This is the realm's state directory. This will contain such files as that realm's rollrec lock file and the rollerd communications socket. If the statedir is not defined for a realm, then the realm's configdir is used for that value. -user This is the user that the realm is executed as. (This is not yet implemented in dtrealms.) -help Display a usage message. -Version Display version information for realminit and DNSSEC-Tools. EXAMPLES
The following options should make clear how realminit deals with options and the new realms. Example 1 will show the complete new realm record. For the sake of brevity, the remaining examples will only show the fields relevant to that example. Further examples will also use short-hand forms of the option names. Example 1. One realm, with -statedir This example shows the realm generated by giving realminit a single realm. $ realminit -active -configdir /realms/confs/example -statedir /realms/states/example -realmdir /realms/realms/example -rollrec example.rrf -admin bob@cat.example.com -args "-loglevel phase -logfile logger" example realm "example" state "active" configdir "/realms/confs/example" statedir "/realms/states/example" realmdir "/realms/realms/example" rollrec "example.rrf" administrator "bob@cat.example.com" display "1" manager "rollerd" args "-loglevel phase -logfile logger" Example 2. One realm, without -statedir This example shows the realm generated by giving realminit a single realm. $ realminit -active -configdir /realms/confs/example -realmdir /realms/realms/example -rollrec example.rrf -admin bob@cat.example.com -args "-loglevel phase -logfile logger" example realm "example" state "active" configdir "/realms/confs/example" statedir "/realms/confs/example" ... Example 3. Two realms, without metacharacters This example shows the realms generated by giving realminit two realms, without using the special "=" metacharacter. $ realminit -configdir /realms/confs/example -statedir /realms/states/example -realmdir /realms/realms/example -rollrec example.rrf -admin bob@cat.example.com example test realm "example" configdir "/realms/confs/example" statedir "/realms/states/example" realmdir "/realms/realms/example" rollrec "example.rrf" administrator "bob@cat.example.com" ... realm "test" configdir "/realms/confs/example" statedir "/realms/states/example" realmdir "/realms/realms/example" rollrec "example.rrf" administrator "bob@cat.example.com" ... Example 4. Two realms, with metacharacters This example shows the realms generated by giving realminit two realms, and that uses the special "=" metacharacter. $ realminit -configdir /realms/confs/= -statedir /realms/states/= -realmdir /realms/realms/= -rollrec =.rrf -admin bob@cat.=.com example test realm "example" configdir "/realms/confs/example" statedir "/realms/states/example" realmdir "/realms/realms/example" rollrec "example.rrf" administrator "bob@cat.example.com" ... realm "test" configdir "/realms/confs/test" statedir "/realms/states/test" realmdir "/realms/realms/test" rollrec "test.rrf" administrator "bob@cat.test.com" ... COPYRIGHT
Copyright 2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. AUTHOR
Wayne Morrison, tewok@tislabs.com SEE ALSO
lsrealm(1), dtrealms(8), realmchk(8) Net::DNS::SEC::Tools::realm.pm(3), file-realmrec.pm(5) perl v5.14.2 2012-06-21 REALMINIT(1p)
All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy