I have a text file with following content (3 lines)
filename : output.txt
first line:12/12/2008
second line:12/12/2008
third line:Y
I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before.
I tried using cat output.txt... (4 Replies)
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
Hi All,
I am tring to insert a newline with "/" in a text file whenever there is the text "end;"
right now I have inside file:
.
.
end;
I want to have:
.
.
end;
/
I tried doing the following within the file
:g/^end;/s//end; \/ / (4 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
What is the proper syntax to add specific text to a column in a file? Both the input and output below are tab-delineated. What if there are multiple text/fields, such as /CP&/2 /CM&/3 /AA&/4 Thank you :).
sed 's/*/Index&/1' del.txt.hg19_multianno.txt > matrix.del.txt (4 Replies)
I am trying to use awk to match the NM_ in file with $1 of id which is tab-delimited. The NM_ will always be in the line of file that starts with > and be after the second _. When there is a match between each NM_ and id, then the value of $2 in id is substituted or used to update the NM_. Each NM_... (3 Replies)
In the awk I have a very large tab-delimeted file that I am trying to extract the DP= value put it in $16 and add
specific text to $16 with . (dot) in $11-$15 and $18. Only the lines (there are several) that have the formating below in file
will have an empty $16. Other lines will be in a... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT MINIX
upsset.conf
UPSSET.CONF(5) NUT Manual UPSSET.CONF(5)NAME
upsset.conf - Configuration for Network UPS Tools upsset.cgi
DESCRIPTION
This file only does one job--it lets you convince upsset.cgi(8) that your system's CGI directory is secure. The program will not run until
this file has been properly defined.
SECURITY REQUIREMENTS upsset.cgi(8) allows you to try login name and password combinations. There is no rate limiting, as the program shuts down between every
request. Such is the nature of CGI programs.
Normally, attackers would not be able to access your upsd(8) server directly as it would be protected by the LISTEN directives in your
upsd.conf(5) file, tcp-wrappers (if available when NUT was built), and hopefully local firewall settings in your OS.
upsset runs on your web server, so upsd will see it as a connection from a host on an internal network. It doesn't know that the connection
is actually coming from someone on the outside. This is why you must secure it.
On Apache, you can use the .htaccess file or put the directives in your httpd.conf. It looks something like this, assuming the .htaccess
method:
<Files upsset.cgi>
deny from all
allow from your.network.addresses
</Files>
You will probably have to set "AllowOverride Limit" for this directory in your server-level configuration file as well.
If this doesn't make sense, then stop reading and leave this program alone. It's not something you absolutely need to have anyway.
Assuming you have all this done, and it actually works (test it!), then you may add the following directive to this file:
I_HAVE_SECURED_MY_CGI_DIRECTORY
If you lie to the program and someone beats on your upsd through your web server, don't blame me.
SEE ALSO upsset.cgi(8)
Internet resources:
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/22/2012 UPSSET.CONF(5)