Hello,
I'm spendind hours trying to figure out how a script could remove files and folders older than 30days in a given volume (/dataVolumes/Booba.1.0).
Within this volume, all users have their personal folder that starts with "RC-..", so the script should skip them for deletion.
I will... (4 Replies)
Hello everyone,
My OS is AIX 5.2
I would like some help in getting command syntax that does the following:
1. Searches simultaneously several directories downward;
2. Checks every subdirectory in each directory (and so on...) for file names that contain certain characters such as “~”, start... (0 Replies)
Hi all,
i would like to create a script that move and rename files from all the subdirectories of a given directory to others subdirectories of the same directory based on "matching" criteria in the "from" and "to" parameters.
Example:
Begin script
from /home/test/1_T_2008* move to... (3 Replies)
Hi All,
I am creting archive script in which i need to split the source file's to different target folder's based on the input file name first character.
Input1.txt -- will contains file names that are needs to be Archive.
Input1.txt
A1213355
B2255666
C2254555
A6655444
C5566445
... (2 Replies)
I have a file.....
xxx 2345 455
abc 345 555
cdf 456 777
fff 555 888
Now my requirement is, Say if, i want to select only those records prior to the record fff 555 888...
how do i go about doing this in unix....
The fff would be hardcoded as it wud be fixed and everytime when i... (7 Replies)
I have a requirement where in i need to select records right below the search criteria
qwertykeyboard white
10 20 30
30 40 50
60 70 80
qwertykeyboard black
40 50 60
70 90 100
qwertykeyboard and white are headers separated by a tab.
when i execute my script..i would be searching... (4 Replies)
i have a directory which consist of multiple files out of which there are some files that has -e in their name.
I want to write a script that will change all those file-name to -l
example there are some files with name :
file1-e.wav
file2-e.wav
file3-english-e.wav
file-4-e.wav
... (3 Replies)
Hi!
I need to merge two files when col1 (x:x:x) matching and adds second column from file1.txt.
# cat 1.txt
aaa;a12
bbb;b13
ccc;c33
ddd;d55
eee;e11
# cat 2.txt
bbb;b55;34444;d55
aaa;a15;35666;a44
I try with this awk and I get succesfully first column from 1.txt:
# awk -F";"... (2 Replies)
Hi,
Please excuse for often requesting queries and making R&D, I am trying to work out a possibility where i have two files field separated by pipe and another file containing only one field where there is no matching columns, Could you please advise how to merge two files.
$more... (3 Replies)
I have one script as below:
#!/bin/ksh
Outputfile1="/home/OutputFile1.xls"
Outputfile2="/home/OutputFile2.xls"
InputFile1="/home/InputFile1.sql"
InputFile2="/home/InputFile2.sql"
echo "Select hobby, class, subject, sports, rollNumber from Student_Table" >> InputFile1
echo "Select rollNumber... (3 Replies)
Discussion started by: Sharma331
3 Replies
LEARN ABOUT DEBIAN
dpkg::index
Dpkg::Index(3) libdpkg-perl Dpkg::Index(3)NAME
Dpkg::Index - generic index of control information
DESCRIPTION
This object represent a set of Dpkg::Control objects.
FUNCTIONS
my $index = Dpkg::Index->new(%opts)
Creates a new empty index. See set_options() for more details.
$index->set_options(%opts)
The "type" option is checked first to define default values for other options. Here are the relevant options: "get_key_func" is a
function returning a key for the item passed in parameters. The index can only contain one item with a given key. The function used
depend on the type: for CTRL_INFO_PKG, CTRL_INDEX_SRC, CTRL_INDEX_PKG and CTRL_PKG_DEB it's simply the Package field; for CTRL_PKG_SRC
and CTRL_INFO_SRC, it's the Source field; for CTRL_CHANGELOG it's the Source and the Version fields (concatenated with an intermediary
"_"); for CTRL_FILE_CHANGES it's the Source, Version and Architecture fields (concatenated with "_"); for CTRL_FILE_VENDOR it's the
Vendor field; for CTRL_FILE_STATUS it's the Package and Architecture fields (concatenated with "_"). Otherwise it's the Package field
by default.
$index->get_type()
Returns the type of control information stored. See the type parameter set during new().
$index->add($item, [$key])
Add a new item in the index. If the $key parameter is omitted, the key will be generated with the get_key_func function (see
set_options() for details).
$index->load($file)
Reads the file and creates all items parsed. Returns the number of items parsed. Handles compressed files transparently based on their
extensions.
$index->parse($fh, $desc)
Reads the filehandle and creates all items parsed. Returns the number of items parsed.
$index->save($file)
Writes the content of the index in a file. Auto-compresses files based on their extensions.
my $item = $index->new_item()
Creates a new item. Mainly useful for derived objects that would want to override this method to return something else than a
Dpkg::Control object.
my $item = $index->get_by_key($key)
Returns the item identified by $key or undef.
my @keys = $index->get_keys(%criteria)
Returns the keys of items that matches all the criteria. The key of the %criteria hash is a field name and the value is either a regexp
that needs to match the field value, or a reference to a function that must return true and that receives the field value as single
parameter, or a scalar that must be equal to the field value.
my @items = $index->get(%criteria)
Returns all the items that matches all the criteria.
$index->remove_by_key($key)
Remove the item identified by the given key.
my @items = $index->remove(%criteria)
Returns and removes all the items that matches all the criteria.
$index->merge($other_index, %opts)
Merge the entries of the other index. While merging, the keys of the merged index are used, they are not re-computed (unless you have
set the options "keep_keys" to "0"). It's your responsibility to ensure that they have been computed with the same function.
$index->sort(&sortfunc)
Sort the index with the given sort function. If no function is given, an alphabetic sort is done based on the keys. The sort function
receives the items themselves as parameters and not the keys.
my $str = $index->output()
"$index"
Get a string representation of the index. The Dpkg::Control objects are output in the order which they have been read or added except
if the order hae been changed with sort().
$index->output($fh)
Print the string representation of the index to a filehandle.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.15 2014-06-05 Dpkg::Index(3)