01-27-2020
Dear mohtashims,
You continue to ignore my instructions to you as the lead admin and moderator here.
If you post again, without doing your own work, attempting your own script, before posting, I will give you another infraction for not following my instructions.
It is a community rule violation to not follow moderator instructions; and you are doing it "repeatedly" without regard. You have 993 posts, so you know "how it works" here.
This is my last warning. Please be advised.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file like: myfile.txt
it is easy to learn awk and begin awk scripting
and awk has got many features
awk is a powerful text processing tool
Now i want to get the text between first awk and immediate awk not the third awk . How to get it ? its urgent pls help me and file is unevenly... (2 Replies)
Discussion started by: santosh1234
2 Replies
2. Shell Programming and Scripting
Hi,
I have a file from which i need to extract data between two constant strings.
The data looks like this :
Line 1 SUN> read db @cmpd unit 60
Line 2 Parameter: CMPD -> "C00071"
Line 3
Line 4 SUN> generate
Line 5 tabint>ERROR: (Variable data)
The data i need to extract is... (11 Replies)
Discussion started by: mjoshi
11 Replies
3. Shell Programming and Scripting
Hi,
I am a newbie to shell scripting and to Linux environment as well.
In my project I am trying to search for following text from the httpd.conf file
<Directory '/somedir/someinnerdir'>
AllowOverride All
</Directory>
and then remove this text and again rewrite the same text.
The... (1 Reply)
Discussion started by: bhushan
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I'm trying to retrieve text between two strings excluding the two strings.
So for example I have the following input:
type=friend
username=phone1
secret=password
host=dynamic
dtmfmode=rfc2833
mailbox=9664
context=sip
insecure=very
canreinvite=no
nat=yes
realm=192.168.1.122... (3 Replies)
Discussion started by: the1armedcoder
3 Replies
5. Shell Programming and Scripting
Hi.
I have a text test1.txt file like:Receipt
Line1
Line2
Line3
End
Receipt
Line4
Line5
Line6
Canceled
Receipt
Line7
Line8
Line9
End (9 Replies)
Discussion started by: TQ3
9 Replies
6. UNIX for Advanced & Expert Users
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Discussion started by: Pioneer1976
3 Replies
7. Shell Programming and Scripting
Hi,
I want to extract some text between two strings in a line i am using following command i.e;
awk '/-string1/,/-string2/' filename
contents of file is---
line1
line2
aaa -bbb -ccc -string1 c,d,e -string2
line4
but it is showing complete line which is having searched strings.
aaa... (19 Replies)
Discussion started by: emresearch
19 Replies
8. Shell Programming and Scripting
Hi I have something like this:
EXAMPLE 1
CREATE UNIQUE INDEX "STRING_1"."STRING_2" ON "BOSNI_CAB_EVENTO"
("CD_EVENTO" , "CD_EJECUCION" ) PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 5242880 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "DB1000_INDICES_512K"... (4 Replies)
Discussion started by: chrispaz81
4 Replies
9. Shell Programming and Scripting
Hi,
I have a text like these:
ECHO "BEGGINING THE SHELL....."
MV FILE1 > FILE2
UNIQ_ID=${1}
PARTITION_1=`${PL}/Q${CON}.KSH "SELECT ....."
PARTITION_2=`${PL}/Q${CON}.KSH "SELECT ........"
${PL}/Q${CON}.KSH "CREATE ...."
IF ....
.......
I would like to extract only text that only... (4 Replies)
Discussion started by: mierdatuti
4 Replies
10. Shell Programming and Scripting
Here is my sample file data:
My requirement is to have a regex expression that is able to search for visible starting string "SSLInsecureRenegotiation Off" between strings "<VirtualHost " and "</VirtualHost>".
In the sample data two lines should be matched.
Below is what I tried but... (5 Replies)
Discussion started by: mohtashims
5 Replies
tcprules(1) General Commands Manual tcprules(1)
NAME
tcprules - compile rules for tcpserver
SYNOPSIS
tcprules rules.cdb rules.tmp
OVERVIEW
tcpserver optionally follows rules to decide whether a TCP connection is acceptable. For example, a rule of
18.23.0.32:deny
prohibits connections from IP address 18.23.0.32.
tcprules reads rules from its standard input and writes them into rules.cdb in a binary format suited for quick access by tcpserver.
tcprules can be used while tcpserver is running: it ensures that rules.cdb is updated atomically. It does this by first writing the rules
to rules.tmp and then moving rules.tmp on top of rules.cdb. If rules.tmp already exists, it is destroyed. The directories containing
rules.cdb and rules.tmp must be writable to tcprules; they must also be on the same filesystem.
If there is a problem with the input, tcprules complains and leaves rules.cdb alone.
The binary rules.cdb format is portable across machines.
RULE FORMAT
A rule takes up one line. A file containing rules may also contain comments: lines beginning with # are ignored.
Each rule contains an address, a colon, and a list of instructions, with no extra spaces. When tcpserver receives a connection from that
address, it follows the instructions.
ADDRESSES
tcpserver starts by looking for a rule with address TCPREMOTEINFO@TCPREMOTEIP. If it doesn't find one, or if TCPREMOTEINFO is not set, it
tries the address TCPREMOTEIP. If that doesn't work, it tries shorter and shorter prefixes of TCPREMOTEIP ending with a dot. If none of
them work, it tries the empty string.
For example, here are some rules:
joe@127.0.0.1:first
18.23.0.32:second
127.:third
:fourth
::1:fifth
If TCPREMOTEIP is 10.119.75.38, tcpserver will follow the fourth instructions.
If TCPREMOTEIP is ::1, tcpserver will follow the fifth instructions. Note that you cannot detect IPv4 mapped addresses by matching
"::ffff", as those addresses will be converted to IPv4 before looking at the rules.
If TCPREMOTEIP is 18.23.0.32, tcpserver will follow the second instructions.
If TCPREMOTEINFO is bill and TCPREMOTEIP is 127.0.0.1, tcpserver will follow the third instructions.
If TCPREMOTEINFO is joe and TCPREMOTEIP is 127.0.0.1, tcpserver will follow the first instructions.
ADDRESS RANGES
tcprules treats 1.2.3.37-53:ins as an abbreviation for the rules 1.2.3.37:ins, 1.2.3.38:ins, and so on up through 1.2.3.53:ins. Similarly,
10.2-3.:ins is an abbreviation for 10.2.:ins and 10.3.:ins.
INSTRUCTIONS
The instructions in a rule must begin with either allow or deny. deny tells tcpserver to drop the connection without running anything.
For example, the rule
:deny
tells tcpserver to drop all connections that aren't handled by more specific rules.
The instructions may continue with some environment variables, in the format ,VAR="VALUE". tcpserver adds VAR=VALUE to the current envi-
ronment. For example,
10.0.:allow,RELAYCLIENT="@fix.me"
adds RELAYCLIENT=@fix.me to the environment. The quotes here may be replaced by any repeated character:
10.0.:allow,RELAYCLIENT=/@fix.me/
Any number of variables may be listed:
127.0.0.1:allow,RELAYCLIENT="",TCPLOCALHOST="movie.edu"
SEE ALSO
tcprulescheck(1), tcpserver(1), tcp-environ(5)
tcprules(1)