Sponsored Content
Full Discussion: Cal -m on bash
Top Forums Shell Programming and Scripting Cal -m on bash Post 302804327 by clx on Wednesday 8th of May 2013 11:53:37 AM
Old 05-08-2013
I guess its duplicate thread?

How to get first sunday of the month?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cal command

I am trying to configure the cal command to recognize the month names. When you type: cal - you get the calander for the current month of the current year. Is there a way of making the system recognize March, and Mar. So I could type: cal March or cal mar and get the same response as cal.... (5 Replies)
Discussion started by: Astudent
5 Replies

2. UNIX for Dummies Questions & Answers

cal

hey everyone. I'm new to UNIX, and I'm having trouble with the cal command. I know that you can display a calendar if you just type in 'cal 3 2005' for example. But how would you do it if you just wanted the calendars displayed to be from March 2005 to June 2005? Thanks (4 Replies)
Discussion started by: pythonman
4 Replies

3. AIX

doubt in cal command

I am new to unix... How to get all the saturdays of a specific year? for a specific month, i tried as below.. cal 02 2006 | awk '{print $7}' but it is not giving all saturdays.... can anyone help me with this? Thanks in advance, Sumi (9 Replies)
Discussion started by: sumi
9 Replies

4. UNIX for Dummies Questions & Answers

Cal question

This probably would be a cake walk for you, but i am having trouble with this. I am trying to print every tuesday of the month from cal, and the FS default is space. There is one row that has few spaces at the beginning and so when i print $3, those spaces get ingnored and a different day gets... (2 Replies)
Discussion started by: Vin
2 Replies

5. UNIX for Advanced & Expert Users

Get date from cal function

Cal Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 cal | awk '{print $7}' Sat 13 20 27 In the above output i am missing 6 because the first column is empty so it is shfting. How... (3 Replies)
Discussion started by: ukatru
3 Replies

6. Shell Programming and Scripting

Get day of week from cal

Hi all, I am trying to get dow from cal using below script #! /bin/bash YEAR=`echo $1 | cut -c 1-4` MONTH=`echo $1 | cut -c 5-6` DAY=`echo $1 | cut -c 7-8` for i in 1 2 3 4 5 6 7 do dayofweek=`cal $MONTH $YEAR | awk '$i == $DAY {printf("%s","$i")}'` echo $dayofweek... (4 Replies)
Discussion started by: bzylg
4 Replies

7. UNIX for Dummies Questions & Answers

cal command

Hello, I wanted to display calender for the previou, current and next month in a single command... I used the command cal -3 for this. But its throwing me a Bad Argument error. I am using HP UX to execute this command. Is this a syntax error, or let me know if there any other ways to... (6 Replies)
Discussion started by: atlantis
6 Replies

8. UNIX for Dummies Questions & Answers

Cal command in UNIX

modify "cal " command to display calenders of the specified months. $ cal jan....aug (1 Reply)
Discussion started by: ssaini
1 Replies

9. Homework & Coursework Questions

Using cal in a script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that will: "Display" the number of days in the current month. For example: September... (1 Reply)
Discussion started by: eaafuddy
1 Replies

10. Shell Programming and Scripting

Extract from cal

I was trying to get 1st Sunday in a month. I tried using cal followed by awk NF=1 apparently it would give entire 1st field in that month. Any suggestions (11 Replies)
Discussion started by: penqueen
11 Replies
Mason::Plugin::RouterSimple(3pm)			User Contributed Perl Documentation			  Mason::Plugin::RouterSimple(3pm)

NAME
Mason::Plugin::RouterSimple - Specify routes for page components VERSION
version 0.05 SYNOPSIS
In a top-level component '/archives.mc': %% route ":section/{year:[0-9]{4}}/{month:[0-9]{2}}"; Archives for <b><% $.section %></b> For the month of <% $.month %>/<% $.year %> then "/archives/news/2010/02" outputs Archives for <b>news</b> For the month of 2010/02 DESCRIPTION
See Mason::Manual::RequestDispatch for background on how request paths get mapped to page components. This plugin allows you to parse "$m->path_info" (the remainder of the top-level path) using Router::Simple routes. It can be used whenever "$m->path_info" is set, i.e. with a dhandler or with a partial path. Use the "route" keyword to declare routes, either in a <%class> block or on a %%-line. Like Router::Simple::connect, "route" takes a string/regex pattern and a destination hashref; the latter defaults to "{}" if omitted. e.g. %% route "wiki/:page", { action => "wiki" }; <%class> route "download/*.*", { action => "download" }; route "blog/{year:[0-9]+}/{month:[0-9]{2}}"; </%class> This plugin overrides the default allow_path_info to return true for any component that declares at least one route. For components that do not declare a route, you will need to override "allow_path_info" as usual. Any named captured arguments, including "splat", are placed in component attributes, which are automatically declared (as standard read- write attributes) if you do not otherwise declare them. If you specify more than one route in a component, they will be tried in turn, with the first matching route taking precedence. If none of the routes match, the request will be declined; in a web context this generally means a 404. e.g. Given the route declarations above in a component named '/site.mc', o The URL "/site/wiki/HomePage" will set "$.action = "wiki"" and "$.page = "HomePage"". o The URL "/site/download/ping.mp3" will set "$.action = "download"" and "$.splat = ['ping', 'mp3']". o The URL "/site/blog/2010/02" will set "$.year = "2010"" and "$.month = "02"". o The URLs "/site/other" and "/site/blog/10/02" will result in a decline/404. SUPPORT
The mailing list for Mason and Mason plugins is mason-users@lists.sourceforge.net. You must be subscribed to send a message. To subscribe, visit https://lists.sourceforge.net/lists/listinfo/mason-users <https://lists.sourceforge.net/lists/listinfo/mason-users>. You can also visit us at "#mason" on <irc://irc.perl.org/#mason>. Bugs and feature requests will be tracked at RT: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-RouterSimple bug-mason-plugin-routersimple@rt.cpan.org The latest source code can be browsed and fetched at: http://github.com/jonswar/perl-mason-plugin-routersimple git clone git://github.com/jonswar/perl-mason-plugin-routersimple.git SEE ALSO
Mason, Router::Simple AUTHOR
Jonathan Swartz <swartz@pobox.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-07-03 Mason::Plugin::RouterSimple(3pm)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy