10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
i am trying to match a string and based on that proceed with my script or error out...
i have a file called /tmp/sta.log that will be populated by oracle's spooling..it can
have a output of either 2 of the below (OPEN or errors/ORACLE not avaiable)
$ cat /tmp/sta.log
OPEN
$
$... (2 Replies)
Discussion started by: abdul.irfan2
2 Replies
2. Shell Programming and Scripting
Hello,
I am working with google ngram data set which is of size 100s of gb. Before using it with Java, I wanted to filter it out using shell script.
Here is a sample line in the file:
2.55 1.57 1992 10 20 30
The first two fields (2.55 and 1.57) are... (3 Replies)
Discussion started by: shekhar2010us
3 Replies
3. Shell Programming and Scripting
Hi,
i want to know how to compare string of file with input string
im trying following code:
file_no=`paste -s -d "||||\n" a.txt | cut -c 1`
#it will return collection number from file
echo "enter number"
read " curr_no"
if ; then
echo " current number already present"
fi
... (4 Replies)
Discussion started by: a_smith
4 Replies
4. Shell Programming and Scripting
I have a string like ab or abc of whatever length. But i want to know whether another string ( for example, abcfghijkl, OR a<space> bcfghijkl ab<space> cfghijkl OR a<space>bcfghijkl OR ab<space> c<space> fghijkl ) starts with ab or abc... space might existing on the longer string... If so, i... (4 Replies)
Discussion started by: nram_krishna@ya
4 Replies
5. Shell Programming and Scripting
Little lost here, I am trying to search a line for both values after the $ signs. My ultimate goal is to get percertage.
<?php
$string = "Something on sale for $4 and orginal price $10";
$strstr =. strstr($string, '$');
$strrchr =. strrchr($string, '$');
echo "$strstr<br>";
echo... (1 Reply)
Discussion started by: mrlayance
1 Replies
6. Shell Programming and Scripting
I have a requirement of shell script where i need to read the File name i.e ls -t | head -1 and Match that Filename with some delimited values which are in a separate File.
For Example i am reading the File name i.e (ls -t | head -1) after that i need to read one more sequential file which... (2 Replies)
Discussion started by: dsdev_123
2 Replies
7. Shell Programming and Scripting
Hi,
I have to search for a string in a variable.
Say the variable is var1='ERROR: Make java] as enabled'
here i want to match which are in red color. other like abc etc could change.
Can you tell me the exact command something like the below in perl
if ($var1=~ m/ERROR: Make... (3 Replies)
Discussion started by: ammu
3 Replies
8. Shell Programming and Scripting
for a certain directory, I want to grep a particular file called ABCD so what I do is
ls /my/dir | grep -i "ABCD" | awk '{print $9}'
however, there is also this file called ABCDEFG, the above command would reurn both file when I only want ABCD, please help! (3 Replies)
Discussion started by: mpang_
3 Replies
9. Shell Programming and Scripting
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Discussion started by: amangeles
4 Replies
10. Shell Programming and Scripting
how to match an alphanumeric string like the following.
i have to do like the following.
if the input line is
the data is {clock_91b}
i have to replace that with
the string was ("clock_91b")
i tried like
$line =~ s/the data is\s+\{(+)\}/the string was \(\"$1\"\)/
which... (4 Replies)
Discussion started by: sskb
4 Replies
oidentd_masq.conf(5) File Formats Manual oidentd_masq.conf(5)
NAME
oidentd_masq.conf - oidentd IP masquerading/NAT configuration file.
DESCRIPTION
If you are using IP masquerading or NAT, oidentd can optionally return a username for connections from other machines. Support for this is
specified by calling oidentd with the -m (or --masq) flag and by creating an /etc/oidentd_masq.conf file.
oidentd can also forward requests for an IP masqueraded connection to the machine from which connection originates by way of the -f option.
This will only work if the host to which the connection is forwarded is running oidentd with the -P (proxy) flag, or if the host's ident
daemon will return a valid reply regardless of the input supplied by and the address of the host requesting the info (some ident daemons
for windows do this, maybe others).
FORMAT
<IP Address|Hostname>[/<Mask>] <Ident Response> <System Type>
The first field contains the IP address or the hostname of a machine that IP masquerades through the machine on which oidentd runs. The
mask parameter can be either a network mask or a mask in CIDR notation. A mask of 24 is equivalent to 255.255.255.0, a mask of 16 is
equivalent to 255.255.0.0, etc.
The second field specifies the reply that oidentd will return for lookups to the host matching the IP address specified in the first param-
eter.
The third field specifies the operating system the machine matching the first parameter is running.
EXAMPLES
<Host>[/<Mask>] <Ident Response> <System Type>
192.168.1.1 someone UNIX
192.168.1.2 noone WINDOWS
192.168.1.1/32 user1 UNIX
192.168.1.0/24 user3 UNIX
192.168.0.0/16 user4 UNIX
somehost user5 UNIX
192.168.1.0/255.255.255.0 user6 UNIX
AUTHOR
Ryan McCabe <ryan@numb.org>
http://dev.ojnk.net
SEE ALSO
oidentd(8) oidentd.conf(5)
version 2.0.8 13 Jul 2003 oidentd_masq.conf(5)