Another quick question Summer_cherry, how can I do a multi-dimensional array for Contact Groups, Notifications periods and notification options? As you can see in the example, those have different options separated by comma. Is there an easy way to extract those ?
Again, thank you for your support, your script was very helpful and by far better than my existing solution
Dear friends,
I'm a novice Unix user and I'm trying to learn the ropes. I have a big task I have to accomplish and I'm convinced Unix can get the job done, I just haven't figured out how. I recently posted on the topic of cutting text between unique text patterns and somebody helped me a great... (24 Replies)
Hi ,
a:) i have configuration file with pattren
<Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output>
eg:
myfile.confg
9899000000,9899999999,DATA,b.dat
9899000000,9899999999,SMS,a.dat
b:) Stucture of my data file is... (3 Replies)
Hi,
I have to perform an iterative function on a set of 10 files. After the first round the output files are named differently than the input files.
examples
input file name = xxxx1.yyy
output file name = xxxx1_0001.yyy
I need to rename all of the output files to the original input... (5 Replies)
It would be highly appreciable if any one helps me in this. I am trying to get it done through Java but I love unix and believe it can be done within minutes with couple of lines.
The input log file is a text file contains multiple entries seperated by a blank line.
Each seperated entry... (7 Replies)
Hi All,
I have some HTML files and my requirement is to extract all the anchor text words from the HTML files along with their URLs and store the result in a separate text file separated by space. For example, <a href="/kid/stay_healthy/">Staying Healthy</a>
which has /kid/stay_healthy/ as... (3 Replies)
Hi all,
I have two .txt file i.e.
First text file:
2
4
1
4
Second text file
2 1.nii.gz
4 334.nii.gz
1 12.nii.gz
4 134.nii.gz
If entry in 1st column of 1st text file matches the 1st column of 2nd text file, then copy the file (name of which is the second column) associated with... (4 Replies)
Hi Everyone,
I'm really new to all this so I'm really hoping someone can help. I have a directory with ~1000 lists from which I want to extract lines from and write to new files. For simplicity lets say they are shopping lists and I want to write out the lines corresponding to apples to a new... (2 Replies)
i m unable to extract data from one text files to different text files..i am able to concat two text files in d same file
---------- Post updated at 03:21 PM ---------- Previous update was at 03:16 PM ----------
i want a c program for it (2 Replies)
Hello there,
I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
LEARN ABOUT DEBIAN
safe-rm
SAFE-RM(1) User Contributed Perl Documentation SAFE-RM(1)NAME
safe-rm - wrapper around the rm command to prevent accidental deletions
USAGE
safe-rm [ ... ] (same arguments as rm)
DESCRIPTION
safe-rm prevents the accidental deletion of important files by replacing rm with a wrapper which checks the given arguments against a
configurable blacklist of files and directories which should never be removed.
Users who attempt to delete one of these protected files or directories will not be able to do so and will be shown a warning message
instead.
safe-rm is meant to replace the rm command so you can achieve this by putting a symbolic link with the name "rm" in a directory which sits
at the front of your path. For example, given this path:
PATH=/usr/local/bin:/bin:/usr/bin
You could create the following symbolic link:
ln -s /usr/local/bin/safe-rm /usr/local/bin/rm
CONFIGURATION
Protected paths can be set both at the site and user levels.
Both of these configuration files can contain a list of important files or directories (one per line):
/etc/safe-rm.conf
~/.safe-rm
If both of these are empty, a default list of important paths will be used.
/usr/lib/*
will protect all of the files inside the /usr/lib directory if they are referred to directly, but it will not protect your system against:
rm -rf /usr/lib
For a full protection, you should include both of these lines:
/usr/lib
/usr/lib/*
EXIT STATUS
Same exit status as the real rm command.
Note that if all file arguments are skipped by safe-rm then the exit status will be the same as the exit status of the real rm when no
files arguments are present.
BUGS AND LIMITATIONS
Note that if you put the following in your protected paths list:
$ cat /etc/safe-rm.conf
/usr/lib
Then safe-rm will prevent you from deleting the directory:
$ rm -rf /usr/lib
Skipping /usr/lib
/bin/rm: missing operand
Try `/bin/rm --help' for more information.
However it cannot protect you from the following:
$ cd /usr/lib
$ rm -f *
AUTHOR
Francois Marier <francois@safe-rm.org.nz>
SEE ALSO rm(1)LICENSE AND COPYRIGHT
Copyright (C) 2008-2009 Francois Marier
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
perl v5.14.2 2012-05-28 SAFE-RM(1)