- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tr output different in other directories
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2000 12:34 AM
тАО06-27-2000 12:34 AM
in user home directory /na/tmc/jcl
#echo "STAND1" | tr [A-Z] [a-z]
gives the expected result
#stand1
if I then cd to /na/tmc/jcl/tmc and run the same command I get a usage error
#tr:the combination of options and string parameters is not legal
this happens for users and superuser
there is no tr file in current directory
results the same for ksh and sh shell
also if i do the same tr command in the root directory i get the following results
#STaND1
anyone got any ideas?
Paul Gold
CAST
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2000 03:06 AM
тАО06-27-2000 03:06 AM
Re: tr output different in other directories
Easy:
echo "STAND1" | tr "[A-Z]" "[a-z]"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2000 03:20 AM
тАО06-27-2000 03:20 AM
Re: tr output different in other directories
& did the previous post resolve your problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2000 04:39 AM
тАО06-27-2000 04:39 AM
Re: tr output different in other directories
this could be a shell expansion problem because you have not quoted the tr arguments.
In one directory there seem to be no file which begins with A-Z or a-z.
In the other directory there are possibly files which begin with these chars an so the shells expands the [A-Z] or [a-z] and you get a syntax error for tr.
Greetings
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2000 12:44 AM
тАО06-28-2000 12:44 AM
Re: tr output different in other directories
unfortunately it doesnt work
if we do
#echo "STAND1" | tr "[A-Z]" "[a-z]"
we get
ksh "[A-Z]" not found
the developer has found a workaround but would like to know why the original problem happened (dont they always) :-)
#echo STAND1 | tr [A-Z] a-z
it works in ALL directories
any explanations please ?
Paul Gold
CAST
PS hi Alex, never heard of you :-), yes its me, these forums are a lot easier than logging calls with OSD Boeblingen, when the forums are working that is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2000 01:07 AM
тАО06-28-2000 01:07 AM
Re: tr output different in other directories
it seems to me very strange that you get
ksh "[A-Z]" not found
But your initial problem by my though was the shell expansion:
Try this:
Make a new directory
Change to that directory
Touch two files: touch A B
Try your command and i bet that you get the error: tr:the combination of options and string parameters is not legal
Let me explain:
If the string [A-Z] is not qouted, the shell expands in this case [A-Z] to AB because you have a file named A and a file named B.
So the results of the tr command is:
tr A B a-z
and that didn't work.
You can easisly check the result of [A-Z]
by using:
echo [A-Z]
Hope i was right.
Greetings
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2000 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2000 05:59 AM
тАО06-28-2000 05:59 AM
Re: tr output different in other directories
thanks for the help
I think the developer (and others)have some screwy things in their profiles as I got it working by removing the generic one and then using your quoted commands
Paul Gold
CAST