03-24-2012
wow.. thanks a lot..
can you please explain me your three code. It will help me to learn awk more better.
Thanks,
Kalai
---------- Post updated at 11:36 AM ---------- Previous update was at 09:24 AM ----------
Hi Experts,
i came across one more scenario.Initially i have not thought about it.
Below is my input
Quote:
input abc = Welcome;
program input= {
first input = ;
input parameter {
param1
param2
}
input param1 = {
Welcome to unix1
Welcome to unix2
}
input param2 = {
Welcome to unix3
Welcome to unix4
}
}
output= {
input parameter {
out-param1
out-param2
}
}
I want to extract my pattern "input parameter" from the block "program input".
When i run the below command i get the out put is.
Quote:
awk '/input parameter/{f=1;next}/}/{f=0}f&&/./' f1
Output:
Quote:
param1
param2
out-param1
out-param2
I need only the below output.
Thanks,
Kalai
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
a:) i have configuration file with pattren
<Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output>
eg:
myfile.confg
9899000000,9899999999,DATA,b.dat
9899000000,9899999999,SMS,a.dat
b:) Stucture of my data file is... (3 Replies)
Discussion started by: suparnbector
3 Replies
2. Shell Programming and Scripting
i have textfiles that contain a series of lines that look like this:
string0 .................................................... column3a column4a
string1**384y0439 ..................................... column3b column4b... (2 Replies)
Discussion started by: Deanne
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have some ps files where I want to ectract/copy a certain number from and use that number to rename the ps file.
eg:
'file.ps' contains following text:
14 (09 01 932688 0)t
the text can be variable, the only fixed element is the '14 ('. The problem is that the fixed element can appear... (7 Replies)
Discussion started by: JohnDS
7 Replies
4. Shell Programming and Scripting
Good day, great gurus,
I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Discussion started by: Sp3ck
2 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
1. I have a file that is getting continously refreshed (appended)
I want to grep all the strings containing substring of the type
abcdf123@aaa.xxx.yyy.zzz:portnumber:
where,
before @, any letters or numbers combination,
after @, IP address
then symbol :
then port... (4 Replies)
Discussion started by: kokoras
4 Replies
6. Shell Programming and Scripting
Hi All,
I have a small query. I have a file containing the following lines
File 1:
29-Jul-2011 GMT Static data requires update <Extraction should start here>
-----------
-----------
--------------------
-----------------------
----------- <should stop here>
Pattern1 will be time... (2 Replies)
Discussion started by: gangii87
2 Replies
7. Shell Programming and Scripting
Hello All,
I have a text file with contents as below:
contents of error.txt:
message1="Reason for error code1"
message2="Reason for error code2"
message3="Reason for error code3.
To solve this, you may try doing restart"
I have a requirement where in I have to... (4 Replies)
Discussion started by: asterisk-ix_use
4 Replies
8. Shell Programming and Scripting
Hello I have a large file with lines beginning with 552, 553, 554, below is a small sample, I need to extract the data you can see below highlighted in bold from this file on the same location on every line and output it to a new file.
Thank you in advance for any help
55201KL... (2 Replies)
Discussion started by: firefox2k2
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
10. UNIX for Beginners Questions & Answers
How do I use grep to select words that start with I or O, end in box, and contain at least one letter in between them?
the text file mailinfo.txt contains
Inbox
the Inbox
Is a match box
Doesn't match
INBOX
Outbox
Outbox1
InbOX
Ibox
I box
If the command works correctly it... (4 Replies)
Discussion started by: steezuschrist96
4 Replies
LEARN ABOUT DEBIAN
anytun-controld
ANYTUN-CONTROLD(8) ANYTUN-CONTROLD(8)
NAME
anytun-controld - anycast tunneling control daemon
SYNOPSIS
anytun-controld
[ -h|--help ]
[ -D|--nodaemonize ]
[ -u|--username <username> ]
[ -g|--groupname <groupname> ]
[ -C|--chroot <path> ]
[ -P|--write-pid <filename> ]
[ -L|--log <target>:<level>[,<param1>[,<param2>[..]]] ]
[ -U|--debug ]
[ -f|--file <path> ]
[ -X|--control-host < <host>[:port>] | :<port> > ]
DESCRIPTION
anytun-controld configures the multi-connection support for Anytun. It reads a connection/routing table and outputs it via a tcp socket to
all connected Anytun servers. When the control daemon is restarted with a new connection/routing table all Anytun servers automatically
load the new configuration. Please make sure to protect that information as it contains the connection keys.
OPTIONS
-D, --nodaemonize
This option instructs anytun-controld to run in foreground instead of becoming a daemon which is the default.
-u, --username <username>
run as this user. If no group is specified (-g) the default group of the user is used. The default is to not drop privileges.
-g, --groupname <groupname>
run as this group. If no username is specified (-u) this gets ignored. The default is to not drop privileges.
-C, --chroot <path>
Instruct anytun-controld to run in a chroot jail. The default is to not run in chroot.
-P, --write-pid <filename>
Instruct anytun-controld to write it's pid to this file. The default is to not create a pid file.
-L, --log <target>:<level>[,<param1>[,<param2>[..]]]
add log target to logging system. This can be invoked several times in order to log to different targets at the same time. Every target
hast its own log level which is a number between 0 and 5. Where 0 means disabling log and 5 means debug messages are enabled.
The file target can be used more the once with different levels. If no target is provided at the command line a single target with the
config syslog:3,anytun-controld,daemon is added.
The following targets are supported:
syslog
log to syslog daemon, parameters <level>[,<logname>[,<facility>]]
file
log to file, parameters <level>[,<path>]
stdout
log to standard output, parameters <level>
stderr
log to standard error, parameters <level>
-U, --debug
This option instructs Anytun to run in debug mode. It implicits -D (don't daemonize) and adds a log target with the configuration
stdout:5 (logging with maximum level). In future releases there might be additional output when this option is supplied.
-f, --file <path>
The path to the file which holds the sync information.
-X, --control-host <hostname|ip>[:<port>]
fetch the config from this host. The default is not to use a control host and therefore this is empty. Mind that the port can be
omitted in which case port 2323 is used. If you want to specify an ipv6 address and a port you have to use [ and ] to separate the
address from the port, eg.: [::1]:1234. If you want to use the default port [ and ] can be omitted.
BUGS
Most likely there are some bugs in Anytun. If you find a bug, please let the developers know at satp@anytun.org. Of course, patches are
preferred.
SEE ALSO
anytun(8), anytun-config(8), anytun-showtables(8)
AUTHORS
Othmar Gsenger <otti@anytun.org> Erwin Nindl <nine@anytun.org> Christian Pointner <equinox@anytun.org>
RESOURCES
Main web site: http://www.anytun.org/
COPYING
Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl and Christian Pointner. This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License,
or any later version.
12/30/2011 ANYTUN-CONTROLD(8)