Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Need help in Shell scripting
System Administration
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
Blogs
- Hybrid Cloud
- Edge
- Data & AI
- Working in Tech
- AI Insights
- Alliances
- Around the Storage Block
- Behind the scenes at Labs
- Careers in Tech
- HPE Storage Tech Insiders
- Inspiring Progress
- IoT at the Edge
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Russia
- HPE Blog, UK & Ireland
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-28-2006 08:12 PM
08-28-2006 08:12 PM
Re: Need help in Shell scripting
hi,
I'msorry i wrong type the first line of teh script: user instead of usr.
I improved a script a bit as well removing teh TEMP variable.
#/usr/bin/ksh
MM=${1:-$(date +%m)}
YYYY=${2:-$(date +%Y)}
DAYS=$(cal $MM $YYYY|awk 'END {print $NF}')
echo "$MM $YYYY has $DAYS"
#eof
HTH,
Art
I'msorry i wrong type the first line of teh script: user instead of usr.
I improved a script a bit as well removing teh TEMP variable.
#/usr/bin/ksh
MM=${1:-$(date +%m)}
YYYY=${2:-$(date +%Y)}
DAYS=$(cal $MM $YYYY|awk 'END {print $NF}')
echo "$MM $YYYY has $DAYS"
#eof
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-31-2006 05:54 PM
08-31-2006 05:54 PM
Re: Need help in Shell scripting
Hi Joel,
Thanks, exactly what I was looking for...
Thx, Cem and Arturo...
Assigned points too.. :-), WH
Thanks, exactly what I was looking for...
Thx, Cem and Arturo...
Assigned points too.. :-), WH
Reading is a good course medicine for deep sleep !!
- « Previous
-
- 1
- 2
- Next »
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.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP