The problem is that I have both AIX and Linux systems.
On some servers hostname is either Uppercase or Lowercase.
Thus, I need a posix solution that works on AiX and non-AiX L/Unix based system where i should be able to determine if the file exists irrespective of whether than server has hostname in UPPER or lower case.
A different approach / solution will also be appreciated.
i tried the following but it does not work on AiX:
cd /app/weblogic/myserver4/logs/`MYHOSTTSTAPP1 | tr '[[:upper:]]' '[[:lower:]]'`*
ksh: MYHOSTTSTAPP1: not found
cd /app/weblogic/myserver4/logs/`MYHOSTTSTAPP1* | tr '[[:upper:]]' '[[:lower:]]'`
ksh: MYHOSTTSTAPP1*: not found
cd /app/weblogic/myserver4/logs/`MYHOSTTSTAPP1 | tr '[[:upper:]]' '[[:lower:]]'`*
ksh: MYHOSTTSTAPP1*: not found
The below does not throw any error but it does not take me inside the desired folder.
cd /app/weblogic/myserver4/logs/MYHOSTTSTAPP1* | tr '[[:upper:]]' '[[:lower:]]'