Re: Getting file version
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Wed, 14 Feb 2007 14:44:55 -0500
On 2007-02-14, dantes990@xxxxxxxxx wrote:
I want to write a script to get the versions for all the files in a
directory, then output this info (file name and version) to a text
file. Seems like there should be a command or at least simple way to
do this, but I am not finding one. This script will be running from
terminal on OS X and typically I've scripted using the bourne shell
before, but I am open to any ideas. Any help is appreciated.
for file in *
do
printf "%s: " "$file"
: whatever command gets you the version
done > version_file
Many files do not have a version, so use whatever command works
for the files in question.
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.
- Follow-Ups:
- Re: Getting file version
- From: dantes990
- Re: Getting file version
- References:
- Getting file version
- From: dantes990
- Getting file version
- Prev by Date: Re: Comparing values
- Next by Date: Re: Comparing values
- Previous by thread: Re: Getting file version
- Next by thread: Re: Getting file version
- Index(es):
Relevant Pages
|