Hi
I have a list of files in a folder.I have a search pattern in the file name and i want to remove the file with that pattern.How can that be made
List of files
xxxxx.ID1.yyyyy.zzzzz
yyyy.ID2.bbbbb.kkkkk
xxxxx.ID1.yyyyy.zzzzz
yyyy.ID4.bbbbb.kkkkk
xxxxx.ID1.yyyyy.zzzzz... (2 Replies)
Helo ,
I m writing small module of c.on RHEL 4
I have one buffer (for e.g. buffer = "002"
now I want to check whethere buffer contains leading zeroes and if it contains
leading zeroes then I want to remove all leading zeroes
( i.e. if buffer = "002" then I want to make buffer = "2")
how... (1 Reply)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Hi all,
I have a big file (n.txt) with following pattern:
ATOM 1 N SER A 1 122.392 152.261 138.190 1.00 0.00 N
ATOM 2 CA SER A 1 122.726 151.241 139.183 1.00 0.00 C
TER
ENDMDL
ATOM 1 N SER A 1 114.207 142.287 135.439 1.00 0.00 ... (3 Replies)
I have a file with entries below.
domain1.com.http:
domain2.com.49503:
I need this to be sorted like below. ie remove the patten after the last right-hand side . (dot).
domain1.com
domain2.com (7 Replies)
Hi,
I want to search a pattern in a text file and remove another pattern in that file.
my text file look like this
0.000000 1.970000 F 303 -
1.970000 2.080000 VH VH +
2.080000 2.250000 VH VH +
2.250000 2.330000 VH L -
2.330000 2.360000 F H +
2.360000 2.410000 L VL -
2.410000 ... (6 Replies)
Hi I have a file where i want to remove a char before a specific pattern.
exp:
CREATE TABLE
(
A,
B,
C, ----comma needs to be removed
)AS SELECT
A,
B,
C, ----comma needs to be removed
FROM TABLE.
So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
debiannet
DebianNet(3pm) Linux Programmer's Manual DebianNet(3pm)NAME
DebianNet.pm - create, remove, enable or disable entry in /etc/inetd.conf
SYNOPSIS
require DebianNet;
DebianNet::add_service($newentry, $group);
DebianNet::remove_service($entry);
DebianNet::enable_service($service, $pattern);
DebianNet::disable_service($service, $pattern);
DESCRIPTION
You can use the functions in DebianNet.pm to to add, remove, enable or disable entries in the /etc/inetd.conf file. After the
/etc/inetd.conf file has been changed, a SIGHUP signal will be sent to the inetd process to make sure that inetd will use the new
/etc/inetd.conf file. The functions can also be used to add entries that are commented out by default. They will be treated like normal
entries. That also means that if you already have an entry that is commented out you can't add an entry for the same service without remov-
ing the old one first.
The DebianNet functions treat entries that are commented out by a single '#' character as entries that have been commented out by a user.
It won't change such entries.
For shell scripts you can also use the update-inetd command. See update-inetd(8) for further information.
VARIABLES
$DebianNet::inetdcf = "FILENAME";
Use FILENAME instead of /etc/inetd.conf (e.g. for testing purposes).
$DebianNet::sep = "#<off># ";
"#<off># " will be used as the default comment characters. You can use this option to specify different comment characters. This
is only necessary if you have to deal with two (or more) services of the same name.
$DebianNet::multi = "true";
If you want to disable/remove more than one entry at a time you should use this option. If you try to remove more than one entry at
a time without using this option the program will show a warning and asks the user if he want to continue.
$DebianNet::verbose = "true";
Explain what is being done.
FUNCTIONS
DebianNet::add_service($newentry, $group);
Add $newentry to the group $group of the /etc/inetd.conf file. If the entry already exist it will be enabled (it will also detect
entries with different program options). Using $group is optional (the default group is the group OTHER). If the group does not
exist the entry will be placed at the end of the file.
DebianNet::remove_service($entry);
Remove $entry from /etc/inetd.conf . You can use a regular expression to remove the entry.
DebianNet::enable_service($service, $pattern);
Enable $service (e.g. "ftp") in /etc/inetd.conf . Using $pattern is optional. It can be used to select a service. You only need
this option if you have two (or more) services of the same name. An example: you have three ftp entries in the /etc/inetd.conf file
(all disabled by default) and you want to enable the entry which uses the wu-ftpd daemon. To do this, use the pattern "wu-ftpd" (or
any other regular expression that matches this entry).
DebianNet::disable_service($service, $pattern);
Disable SERVICE (e.g. "ftp") in /etc/inetd.conf . Using $pattern is optional (see above).
AUTHORS
Peter Tobias, <tobias@et-inf.fho-emden.de>
Ian Jackson <iwj10@cus.cam.ac.uk>
Linux 21 September 1995 DebianNet(3pm)