"Wei Liew" wrote:
> Hi Chris,
> How to create a shellscript that will ask for filename to compare with dictionary?
> I was able to create a shellscript to do character reduction but not for comparing > files as I was not familiar on how to store filename as variable.
When someone else asked this same question, I added the following to the Exercise sheet:
Inside your shellscript (file), you can access the provided command-line argument using
the value of $1.
Sorry, but you may not have seen that if you hadn't refreshed your browser.
In fact, we can pass multiple command-line arguments to a shellscript, perhaps multiple
filenames, and then access each argument with $1, $2, $3, ...
Hope that helps.