Skip to content

Instantly share code, notes, and snippets.

@rbone
Created August 24, 2010 00:58
Show Gist options
  • Save rbone/546680 to your computer and use it in GitHub Desktop.
Save rbone/546680 to your computer and use it in GitHub Desktop.
#!/usr/bin/php
indexer {
mem_limit = 256M
}
searchd
{
port = 3312
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
pid_file = /var/lib/sphinx/searchd.pid
}
<?php
$files = new DirectoryIterator('/home/rbone/projects/contests/db/sphinx/');
foreach ($files as $file)
{
if (!$file->isDot() && $file->isReadable())
echo file_get_contents($file->getPathname());
}
@pda
Copy link

pda commented Aug 24, 2010

Bash version:


#!/bin/bash

cat << _EOF_
indexer {
        mem_limit       = 128M
}

searchd {
        port            = 3312
        log             = /var/log/sphinx/searchd.log
        query_log       = /var/log/sphinx/query.log
        pid_file        = /var/lib/sphinx/searchd.pid
}
_EOF_

for file in /home/paul/projects/contests/db/sphinx/*.conf; do
        cat $file;
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment