So close (scripting help)

Travis Roy travis at scootz.net
Tue Nov 9 12:11:01 EST 2004


Okay, with some big help from Chris I got so close.. but I still need 
one more thing from my script and my extreamly bad regex skills are 
killing me.

This is the output being fed in:

./Customer_Name/Feed_#/Weeklyusage.html.htm

I need to strip out two things. I need the Customer_Name and Feed_#

I can do it with this command from the command line, but it gives me 
nothing within the script.

Here is my entire script so far

#!/bin/bash

for i in `find . | egrep "\/(Daily|Monthly|Weekly)usage.html.htm"`; do
echo "<a href=\"$i\">";

## Below is the command that works from the command line
## but not from within this script. This gives me .Customer_Name
echo $i | awk -F/ '{ print $1 }';

echo "</a>";

done




More information about the gnhlug-discuss mailing list