Script to delete files with an input for directories and an input for path/file
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get.
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.
When I perform the deletion, I will have a list of the upper level directories I want to delect the file path from, and a list of pathed files I want to delete from those directories only.
What would be the best way to set this up with the two input files?
For example, I need to delete:
from
But I want files with the same names elsewhere to be left alone.
Any assistance will be greatly appreciated!
Last edited by methyl; 06-28-2012 at 08:03 PM..
Reason: please use code tags
Hello
I am getting error when the file (Folder or Application) path having space is given as external input to the shell program.
It works fine for the files which has no spaces in the file name
Thans, (5 Replies)
Hi,
I'm looking to delete some files from directories.
I've just put in a file the location of these files.
e.g:
in file supprs.txt there is:
/usr/host/t1.txt
/etc/dev/u1.java
/home/new/files/view.c
Is it possible to take this file "supprs.txt" as a parameter in a shell command ? (2 Replies)
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Hi-
I am hoping someone can give me some pointers to get me started. I have a file which contains some dn's .e.g file 1
cn=bob,cn=user,dc=com
cn=kev,cn=user,dc=com
cn=john,cn=user,dc=com
I have a second file e.g. file.template which looks something like :-
dn: <dn>
objectclass:... (5 Replies)
All,
I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then
Insert file1 column2 to file2 column4 then create a new file.
File1:
12345 Sam
12346 Bob
12347 Bill
File2:... (1 Reply)
1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes?
2) I am running my unix on a server... (1 Reply)
Hi all,
I need a script to delete a large set of files from a directory under / based on an input file and want to redirect errors into separate file.
I have already prepared a list of files in the input file.
Kndly help me.
Thanks,
Prash (36 Replies)
So i have directories that store logs, 1 directorie for each day, with the name like this :
2012_07_01/
2012_07_02/
and for each directorie we have the logs, inside them lives the logs for that day, and every log have this name pattern :
... (2 Replies)
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
LEARN ABOUT DEBIAN
jifty::script::po
Jifty::Script::Po(3pm) User Contributed Perl Documentation Jifty::Script::Po(3pm)
options
Returns a hash of all the options this script takes. (See the usage message for details)
run
Runs the "update_catalogs" method.
_check_mime_type FILENAME
This routine returns a mimetype for the file "FILENAME".
update_catalogs
Extracts localizable messages from all files in your application, finds all your message catalogs and updates them with new and changed
messages.
update_catalog FILENAME
Reads "FILENAME", a message catalog and integrates new or changed translations.
extract_messages
Find all translatable messages in your application, using Locale::Maketext::Extract.
print_help
Prints out help for the package using pod2usage.
If the user specified --help, prints a brief usage message
If the user specified --man, prints out a manpage
pot_name
Returns the name of the po template.
NAME
Jifty::Script::Po - Extract translatable strings from your application
SYNOPSIS
jifty po --language <lang> Creates a <lang>.po file for translation
jifty po Updates all existing po files
Options:
--language Language to deal with
--dir Additional directories to extract from
--js Generate json files from the current po files
--help brief help message
--man full documentation
OPTIONS --language
This script an option, "--language", which is optional; it is the name of a message catalog to create.
--dir Specify explicit directories to extract from. Can be used multiple times. The default directories will not be extracted if you use
this option.
--template_name
Specify the name of the po template. Default to the lower-cased application name.
--podir Specify the directory of the po templates.
--js If "--js" is given, other options are ignored and the script will generate json files for each language under
share/web/static/js/dict from the current po files. Before doing so, you might want to run "jifty po" with "--dir
share/web/static/js" to include messages from javascript in your po files.
--help Print a brief help message and exits.
--man Prints the manual page and exits.
DESCRIPTION
Extracts message catalogs for your Jifty app. When run, Jifty will update all existing message catalogs, as well as create a new one if you
specify a --language option.
perl v5.14.2 2010-12-08 Jifty::Script::Po(3pm)