- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Troubles with cshell
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-08-2006 07:44 AM
тАО06-08-2006 07:44 AM
well, for the first time in my life I'm forced to work with cshell and have some problems.
This is my code:
if ("$field_1" =~ ^[a-z]) then
echo "$field_1 IS OK"
else
echo "$field_1 NOT OK!!!"
endif
As I understand it, it matches the strings that begin with a small letters. But ...
As output for "2F2" and "field_1" I get:
2F2 IS OK
Any ideas what might be the problem?
Thanx :)
Solved! Go to Solution.
- Tags:
- csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:04 AM
тАО06-08-2006 08:04 AM
Re: Troubles with cshell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:41 AM
тАО06-08-2006 08:41 AM
Re: Troubles with cshell
But it must be done with cshell and the worst part is it must run on Sun OS 5.9 ...
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:43 AM
тАО06-08-2006 08:43 AM
Re: Troubles with cshell
But in the mean time I played with it a little. I wonder if the "!" characters in the echo statement are goofing it up? Try removing them. Just a hunch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:48 AM
тАО06-08-2006 08:48 AM
Re: Troubles with cshell
The script doesn't even get there. For some reason "if" returns true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:54 AM
тАО06-08-2006 08:54 AM
Re: Troubles with cshell
Good to see you back in the ITRC Alex! How is the study?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:54 AM
тАО06-08-2006 08:54 AM
Re: Troubles with cshell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 08:55 AM
тАО06-08-2006 08:55 AM
Re: Troubles with cshell
Your example works for me when I change expression in if statement, like this:
if ("$field_1" =~ [a-z]* ) then
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 09:02 AM
тАО06-08-2006 09:02 AM
Re: Troubles with cshell
Well, studies are pretty hard ... As you can see they are torchering me with csh on Sun OS ... And after that I have to write silly game in assembler for PDP11 (think it's grandpa of VAX). Beside that it's OK, but can't say I'm having fun, tho :)
John:
I got "0: Event not found."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 09:06 AM
тАО06-08-2006 09:06 AM
Re: Troubles with cshell
From the HP-UX 11.11 man page:
In an international environment, character ordering is determined by the setting of LC_COLLATE, rather than by the binary ordering of character values in the machine collating sequence. This brings with it certain attendant dangers, particularly when using range expressions in file name generation patterns. For example, the command,
rm [a-z]*
might be expected to match all file names beginning with a lowercase alphabetic character. However, if dictionary ordering is specified by LC_COLLATE, it would also match file names beginning with an uppercase character (as well as those beginning with accented letters). Conversely, it would fail to match letters collated after z in languages such as Norwegian.
The correct (and safe) way to match specific character classes in an international environment is to use a pattern of the form:
rm [[:lower:]]*