KB#00611-Unix script to link lower case files to upper case files
Unix script to link lower case files to upper case files
The following Unix script demonstrates linking an uppercase version of a file to an existing lower case version.
When you FTP data dictionary files from a DOS machine to a Unix machine, it's common for all of the files to be created in lower case on the Unix side. This can cause problems, as the ODBC Driver and TAOS expect the Data Dictionary files to be in upper case. The solution is to link the lower case files to upper case versions. This is accomplished by the following script. Note that the third line specifies only the files that end in .1, so that it will only link the Data Dictionary files.
for i in $files
ln $i `echo $i | tr "[a-z]" "[A-Z]"`
A little piece of useful information on the [a-z] or [A-Z] is that you can use that convention in other Unix commands...if for example you want to 'more' all the upper case files in a directory as in:
or you want to delete all the files that start with a, b or c :
or even [2-4]* (any file that begins with 2,3 or 4)
or even [2-4][6-7]* (any file that begins with 2,3 or 4 and has 6 or 7 as the second number)
Last Modified: 03/30/2000 Product: Other Operating System: UNIX
BASIS structures five components of their technology into the BBx Generations.