I have a shell script and want to assign a value to a variable. The value is the line exctrated from a file using the line number. The line number it is not fix, and could change any time.
I have tried sed, awk, head .. See my script
# Get randome line number from the file
#selectedline = `awk... (1 Reply)
Hello,
I am having trouble extracting a specific line from a file when the line number is known. My first attempt involved grep -n 'hi' (the word 'hi will always be there) to get the line number before the line that I actually want (line 4).
Extra Notes:
-I am working in a bash script.
-The... (7 Replies)
This is the line that I am using:
sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt
and suppose that test.txt contains the following lines:
http://www.example.com/200904/AUS.txt
http://www.example.com/200903/_RUS.txt
http://www.example.com/200902/.FRA.txt
What I expected to see in results.txt... (6 Replies)
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Dear all,
I am trying to extract a number from a line in one file (task 1), duplicate another file (task 2) and replace all instances of the strings 300, in duplicated with the extracted number (task 3). Here is what I have tried so far:
for ((k=1;k<4;k++)); do
temp=`sed -n "${k}p"... (2 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
Hi guys,
I have been trying to do this, but... no luck so maybe you can help me.
I have a line like this:
Total Handled, Received, on queue Input Mgs: 140 / 14 => 0
I need to, get the number after the / until the =, to get only 14 .
Any help is greatly appreciated.
Thanks, (4 Replies)
In the below perl code I am using tags within each line to extract certain information. The tags that are used are:
STB >0.8 is STRAND BIAS otherwise GOOD
FDP is the second number
GO towards the end of the line is read into an array and the value returned is outputed, in the first line that... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT DEBIAN
oidentd_masq.conf
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)