You might be able to use a command analyzer change exit program for this. Just scan the input parameter to see if the user provided any parameters (basically, if the user passed any blanks besides trailing blanks, then the user passed some sort of parameter)

If the user passed parameters, then set them up as the "last used parameters" in a file. If the user passes no parameters, then retrieve the last used parameters and tack them on.

I have a simple example of the command analyzer change exit program in an article I wrote. Granted, it's not exactly what you're trying to do, but maybe it'll give you ideas (the following link requires a membership to SystemiNetwork.com. A free "associate" membership should work):
http://www.systeminetwork.com/article.cfm?id=51363

Jonathan Mason wrote:
I'm in the process of trying to write a utility that will capture which
parameters were specified when a command was executed so that they can be
reused as defaults the next time the command is run for the same object.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.