06-27-2005
Find directories not containing foo, and copy foo to them
Hello all,
I have a situation where I have a web root directory with a few thousand users spread out into 100 subdirectories in a 00/firstname.lastname, 01/firstname.lastname, etc. hierarchy. I suddenly need to make sure that each of these user directories contains a default index.html file (about 1/3 of them don't).
I'm kind of a scripting newbie, so I'm having trouble with the mechanics. The thing that's most perplexing to me is to do a find in [00-99] -maxdepth=2 and search for all user directories that do not contain an index file (index.htm* and/or homepage.html).
I think if I can figure out how to search on that string, I can figure out how to put the index file where it doesn't exist, so what I really need to know is how to search for what's missing.
Thanks in advance for any help.
Dave
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
if ; then
echo Its Cold for $sid at $c_dst
$jobroot/scripts/abc.sh $sid COLD $c_dst
elif ; then
echo Its Hot for $sid at $h_dst
$jobroot/scripts/abc.sh $sid HOT $h_dst
else
echo No backup for $sid today
wat does foo do ?? (2 Replies)
Discussion started by: bn_unx
2 Replies
2. Shell Programming and Scripting
I need a way to grep -v a list of times/date from the output of postqueue -p that are a few hours old, in order to remove them with postsuper -d.
Right now I have a script that is deleting the previous day of messages left in the queue, which runs once each day.
I want to clean up the job and... (1 Reply)
Discussion started by: DoneWithM$
1 Replies
3. Shell Programming and Scripting
Hallo,
I need to test a String (a special ip number-string).
So I want to run that:
ipadress=172.0.0.0
# for debugging:
echo $ipadress | egrep -e '172\.?\.??\.??$'
# the test that doesnt work
if test -z `echo $ipadress | egrep -e '172\.?\.??\.??$'` != ""
then
echo "match"
else... (1 Reply)
Discussion started by: wiseguy
1 Replies
4. Shell Programming and Scripting
I'm very very new to shell scripting (about 4 hours)
i've google'd till i can't google no more
is it possible to have store values in a config file .e.g
/etc/foo.conf
data=/home/
mount=/dev/sda1
size=1GB
and access these values from a shell script but also
be able to use... (3 Replies)
Discussion started by: xpd259
3 Replies
5. Shell Programming and Scripting
Suppose I have a text file that contains the tags <foo> and <bar>. The text file can have unlimted occurances of <foo> and <bar> and looks somthing like this:
<foo>
Some
Text
<foo>
Some
Text
<bar>
Some
Text
<foo>
Some (1 Reply)
Discussion started by: ArterialTool
1 Replies
6. UNIX for Dummies Questions & Answers
Hi:
How can I remove my own post?
Thanks. (2 Replies)
Discussion started by: phil518
2 Replies
7. UNIX for Dummies Questions & Answers
I'm not all that much of a newbie but I've not encountered this before. Happens both in Cygwin and in Mac OS X (Darwin):
cp -R /path/to/foo/.* /path/to/bar
(where directory 'bar' exists)
... seems to copy not only the contents of directory 'foo', but also other directories that are... (3 Replies)
Discussion started by: ChapHarrison
3 Replies
8. UNIX for Dummies Questions & Answers
Sometimes it works for me and sometimes I get this error:
syntax error on line 1, teletype
Basically I've got no idea whats going on, especially at the end of the command: bc
Any help is appreciated (1 Reply)
Discussion started by: phunkypants
1 Replies
9. Shell Programming and Scripting
I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this:
#!/bin/bash
rsync /path/on/local/machine/ foo.com:path/on/remote/machine/
ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies
LEARN ABOUT DEBIAN
biber::entry::name
Biber::Entry::Name(3pm) User Contributed Perl Documentation Biber::Entry::Name(3pm)
NAME
Biber::Entry::Name - Biber::Entry::Name objects
new
Initialize a Biber::Entry::Name object, optionally with key=>value arguments.
Ex: Biber::Entry::Name->new( lastname=>"Bolzmann", firstname=>"Anna Maria", prefix => "von" )
TO_JSON
Serialiser for JSON::XS::encode
notnull
Test for an empty object
was_stripped
Return boolean to tell if the passed field had braces stripped from the original
set_hash
Set a hash for the name
get_hash
Get a hash for the name
set_index
Set a field telling what position in the name list the name is
get_index
Get the index of a Biber::Entry::Name object
set_uniquename
Set uniquename for a visible Biber::Entry::Name object
Sets global flag to say that some uniquename value has changed
set_uniquename_all
Set uniquename for a Biber::Entry::Name object
get_uniquename
Get uniquename for a visible Biber::Entry::Name object
get_uniquename_all
Get uniquename for a Biber::Entry::Name object
reset_uniquename
Reset uniquename for a Biber::Entry::Name object
set_minimal_info
Set the string of lastnames and string of fullnames
Used to track uniquename=5 or 6
get_minimal_info
Get the name context used to track uniquename=5 or 6
get_namepart
Get a namepart by passed name
set_firstname
Set firstname for a Biber::Entry::Name object
get_firstname
Get firstname for a Biber::Entry::Name object
get_firstname_i
Get firstname initials for a Biber::Entry::Name object
set_middlename
Set middlename for a Biber::Entry::Name object
get_middlename
Get middlename for a Biber::Entry::Name object
get_middlename_i
Get middlename initials for a Biber::Entry::Name object
set_lastname
Set lastname for a Biber::Entry::Name object
get_lastname
Get lastname for a Biber::Entry::Name object
get_lastname_i
Get lastname initials for a Biber::Entry::Name object
set_suffix
Set suffix for a Biber::Entry::Name object
get_suffix
Get suffix for a Biber::Entry::Name object
get_suffix_i
Get suffix initials for a Biber::Entry::Name object
set_prefix
Set prefix for a Biber::Entry::Name object
get_prefix
Get prefix for a Biber::Entry::Name object
get_prefix_i
Get prefix initials for a Biber::Entry::Name object
set_gender
Set gender for a Biber::Entry::Name object
get_gender
Get gender for a Biber::Entry::Name object
set_namestring
Set namestring for a Biber::Entry::Name object
get_namestring
Get namestring for a Biber::Entry::Name object
set_nameinitstring
Set nameinitstring for a Biber::Entry::Name object
get_nameinitstring
Get nameinitstring for a Biber::Entry::Name object
name_to_bbl {
Return bbl data for a name
name_to_bltxml {
Add BibLaTeXML for the name to an XML::Writer object
dump
Dump Biber::Entry::Name object
AUTHORS
Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at kime.org.uk>"
BUGS
Please report any bugs or feature requests on our sourceforge tracker at <https://sourceforge.net/tracker2/?func=browse&group_id=228270>.
COPYRIGHT & LICENSE
Copyright 2009-2012 Francois Charette and Philip Kime, all rights reserved.
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
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.
perl v5.14.2 2012-06-17 Biber::Entry::Name(3pm)