On 05/05/11 17:35, Schaeffer, Barry M wrote:
> ProE Gurus,
>
> I have a large number of ProE files in folders which were saved using different versions of ProE (Wildfire 1 thru 3).
>
> I want to rapidly identify the subset of those which were stored in versions prior to WF3.
>
> Is there a tool available for this purpose? Perhaps a method using a tool like grep?
>
> Thanks in advance. I will publish a summary of any methods that work.
>
> Barry Schaeffer
>
> Fluke
>
> Everett WA
>
On Solaris this shell script will do this
==============================================================================================
#!/bin/sh
for file in *
do
version="`head -1 $file | awk '{print $9}'`"
if [ "$version" -lt "2700" ]; then
echo $file
fi
done
==============================================================================================
What this does is loop thru all the files in the current directory and
finds the version by taking the 1st line of each file (head -1 $file) pipe
that to awk to extract the 9th field of that line. Since 2700 is Wildfire 3
it then compares the version to that. If less than "2700" then we have a
pre WF3 file.
--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
Fax: 785-667-2695
------------------------------------------------------------------------