Holy cow! I can't believe I missed that. Of course, I new to server side languages. Thanks so much for the help.
Here is the updated command for those interested (a little more efficient)
----------------------- #!/usr/bin/php <?php
$fstat = fstat(STDIN); $stdin = fread(STDIN, $fstat['size']);
$pattern = '/{(.*)}/Us'; preg_match($pattern, $stdin, $matches); $match = trim($matches[1], "\n"); $match = preg_split('/\n/', $match);
$properties = array();
foreach($match as $line) { $properties[strlen($line)] = $line; }
ksort($properties);
$output = '{' . "\n"; foreach($properties as $line) { $output .= $line . "\n"; } $output .= '}';
echo(trim($output));
?> -----------------------
Ryan
2009/12/10 Björn Jadelius b@jadelius.se:
You just need to remove the newline between
#!/usr/bin/php
and
<?php
Björn Jadelius
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate