- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: parse
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
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
тАО07-19-2002 07:02 AM
тАО07-19-2002 07:02 AM
Suppose I have the following strings:
test.yara.Z
and
test.yara
How can determine whether there is a something else specified after .yara? So, in the first case, there is another extension specified after yara?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2002 07:08 AM
тАО07-19-2002 07:08 AM
Re: parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2002 07:08 AM
тАО07-19-2002 07:08 AM
Re: parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2002 07:10 AM
тАО07-19-2002 07:10 AM
Solutionie: 1.2.3 and returns VALUE=1:
echo $F | grep -E -q "^[0-9]+\.[0-9]+\.[0-9]+$" && VALUE=1
tests for just number:
echo $F | grep -E -q "^[0-9]+$" && VALUE=2
I'm sure you can work on it to remove the [0-9] for files.
This tests for extension xml:
if [ "${_Input#*.}" != "xml" ]; then
echo "xml"
fi
Hope that's a quick start
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2002 07:16 AM
тАО07-19-2002 07:16 AM
Re: parse
Perhaps something like this:
#!/usr/bin/sh
X=`echo ${1##*.}`
if [ "$X" != "yara" ]
then
echo "...unexpected basename"
else
echo "...basename OK"
fi
#.end.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2002 07:19 AM
тАО07-19-2002 07:19 AM