- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Single digit months to single digit?
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
тАО09-19-2007 07:12 AM
тАО09-19-2007 07:12 AM
Thanks,
Solved! Go to Solution.
- Tags:
- date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 07:26 AM
тАО09-19-2007 07:26 AM
Re: Single digit months to single digit?
# date "+%1d"
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 07:27 AM
тАО09-19-2007 07:27 AM
Re: Single digit months to single digit?
# date +'%0.m'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 07:56 PM
тАО09-19-2007 07:56 PM
Re: Single digit months to single digit?
for i in $(locale -a); do
echo $i ====
LANG=$i locale -k d_fmt| grep -v %d
done
For months use:
... grep -v -e %m -e %b
- Tags:
- locale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 11:51 PM
тАО09-19-2007 11:51 PM
Re: Single digit months to single digit?
Thanks for all the responses!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 12:05 AM
тАО09-20-2007 12:05 AM
Re: Single digit months to single digit?
date "+%m" | awk '{ gsub(/^0?/,""); print $0 }'
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 12:05 AM
тАО09-20-2007 12:05 AM
Re: Single digit months to single digit?
# date 10010805
Mon Oct 1 08:05:00 EDT 2007
# date "+%1m"
10
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 12:10 AM
тАО09-20-2007 12:10 AM
Re: Single digit months to single digit?
$ echo $(( $(date "+%m") ))
9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 12:15 AM
тАО09-20-2007 12:15 AM
Re: Single digit months to single digit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 12:19 AM
тАО09-20-2007 12:19 AM
Re: Single digit months to single digit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2007 07:31 AM
тАО09-20-2007 07:31 AM
Re: Single digit months to single digit?
The output of printf says it expands the field to contain the significant digits, it won't be truncated. Only %w.ps will truncate to the precision.
- Tags:
- printf