- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell script Problem
Operating System - HP-UX
1754340
Members
4837
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО12-07-2001 01:25 AM
тАО12-07-2001 01:25 AM
I am writing a script "/match" to print out a line if two fileds in the input file match.input match.
For example:
# cat match.input
abc
abc
# /match
Match!
# cat match.input
abc
def
# /match
Not match!
# cat match.input
abc
ABC
# /match
Match!
The script should be non-case sensitive.
I have written a version with case-sensitive but I cannot write one with non-case sensitive.
I am using awk.
Thx.
For example:
# cat match.input
abc
abc
# /match
Match!
# cat match.input
abc
def
# /match
Not match!
# cat match.input
abc
ABC
# /match
Match!
The script should be non-case sensitive.
I have written a version with case-sensitive but I cannot write one with non-case sensitive.
I am using awk.
Thx.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2001 01:29 AM
тАО12-07-2001 01:29 AM
Solution
Hi,
Set all to lowercase before comparison. Use awk's tolower(s) function.
tolower(s) Converts the argument string s to lowercase and returns the result.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Set all to lowercase before comparison. Use awk's tolower(s) function.
tolower(s) Converts the argument string s to lowercase and returns the result.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2001 01:31 AM
тАО12-07-2001 01:31 AM
Re: Shell script Problem
Hi,
The "tr" command will solve that problem for
you. The example is even given in the
manpages.
Regards,
Tom Geudens
The "tr" command will solve that problem for
you. The example is even given in the
manpages.
Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP