Modify cal command in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Modify cal command in shell script
# 1  
Old 01-25-2013
Modify cal command in shell script

Plz help me

To modify "cal " command to display calenders of the specified months.
$ cal jan mar nov
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Modify Column Data using Shell Script

HI Guys, Input :- P081 wr1 12p0d5: 22.8 P081 wr1 12p2d18: 23.1 P149 wr1 1pxcud6/port_0_dev_7: 20.4 P149 wr1 1pxcud4/port_1_dev_10: 22.4 OutputP081 wr1 120 22.8 P081 wr1 122 23.1 P149 wr1 10 20.4 P149 wr1 11 22.4 In in First two line delete p and after d untill : In Last two line... (4 Replies)
Discussion started by: pareshkp
4 Replies

2. Shell Programming and Scripting

Modify XML tag using shell script

Hi All Need some help with a unix shell script. I have a XML file as shown below: <Root> <Service> <endPoint type="SOAP" protocol="http"> <provider>ABCD</provider> <urlRewrite>/service/xyz/getAccountDetails</urlRewrite> <timeout>30</timeout> </endPoint> </Service> <Service> <endPoint... (3 Replies)
Discussion started by: abhilwa
3 Replies

3. Shell Programming and Scripting

Modify cal command in shell script

Plz help me a) To display on the screen the sorted output of "who" along with the total no. of users. b) the same output (except the no. of users) should be in file FILE1. (2 Replies)
Discussion started by: shivasaini
2 Replies

4. Shell Programming and Scripting

Modify cal command in shell script

Plz help me To modify "cal " command to display calenders of the specified months. $ cal jan....oct (0 Replies)
Discussion started by: shivasaini
0 Replies

5. Shell Programming and Scripting

How to modify character to UTF-8 in shell script?

I have a shell script running to load some data from a text file to database. Text file contains some non-ASCII characters like ü. How can i convert these characters to UTF-8 codes before loading to DB. (5 Replies)
Discussion started by: vel4ever
5 Replies

6. Shell Programming and Scripting

Shell script to modify file in several directories

Hi, I want a script shell to automate modifying httpd.conf file for several instances of apache, save httpd.file before changing it, after modifying it and then restart apache. - Replace ServerRoot "xxxx" by ServerRoot "yyyy" of all directories : "... (4 Replies)
Discussion started by: bras39
4 Replies

7. Shell Programming and Scripting

Modify text file using shell script

Hi, I have a text file which is following format - COL VAL ABC 1 ABC 2 ABC 3 ABC 4 ABC 5 My requirement is to search for a particular value (provided by user) in the file and comment the previous entries including that as well. E.g. If I search for number 3, then the output... (6 Replies)
Discussion started by: bhupinder08
6 Replies

8. Shell Programming and Scripting

Help with a shell script to modify one line and copy the next 9 to same file

Hi everyone, the problem is quite simple, yet I can't find an easy solution using awk. I need to search for a string in $3, then if I find this string, copy the line,modify $3, and copy the next 9 lines to the same file. My problem is in the copying of the lines... Finding and modifying... (5 Replies)
Discussion started by: Teroc
5 Replies

9. Shell Programming and Scripting

how to modify a file using shell script

Hi, i am using SuonOS and ksh. i need to add data into a file(s.txt) using a shell script. i have to pass 3 parameters and these 3 paramaters should add into the file at end of the file. File s.txt is look like, --------------------------------- column1|column2|column3 ... (1 Reply)
Discussion started by: syamkp
1 Replies

10. Shell Programming and Scripting

Is it possible in a shell script to modify itself ??

We are running a quiz and the data collected from the quiz is submitted to the database. My requirement is to write a shell script to get these submitted records. I should be able to run this shell script at any time and the records it returns should be the ones submitted after the script was... (5 Replies)
Discussion started by: sehgalniraj
5 Replies
Login or Register to Ask a Question
CAL(1)							    BSD General Commands Manual 						    CAL(1)

NAME
cal, ncal -- displays a calendar and the date of Easter SYNOPSIS
cal [-3hjy] [-A number] [-B number] [[month] year] cal [-3hj] [-A number] [-B number] -m month [year] ncal [-3hjJpwy] [-A number] [-B number] [-s country_code] [[month] year] ncal [-3hJeo] [-A number] [-B number] [year] ncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm] DESCRIPTION
The cal utility displays a simple calendar in traditional format and ncal offers an alternative layout, more options and the date of Easter. The new format is a little cramped but it makes a year fit on a 25x80 terminal. If arguments are not specified, the current month is dis- played. The options are as follows: -h Turns off highlighting of today. -J Display Julian Calendar, if combined with the -e option, display date of Easter according to the Julian Calendar. -e Display date of Easter (for western churches). -j Display Julian days (days one-based, numbered from January 1). -m month Display the specified month. If month is specified as a decimal number, it may be followed by the letter 'f' or 'p' to indicate the following or preceding month of that number, respectively. -o Display date of Orthodox Easter (Greek and Russian Orthodox Churches). -p Print the country codes and switching days from Julian to Gregorian Calendar as they are assumed by ncal. The country code as deter- mined from the local environment is marked with an asterisk. -s country_code Assume the switch from Julian to Gregorian Calendar at the date associated with the country_code. If not specified, ncal tries to guess the switch date from the local environment or falls back to September 2, 1752. This was when Great Britain and her colonies switched to the Gregorian Calendar. -w Print the number of the week below each week column. -y Display a calendar for the specified year. -3 Display the previous, current and next month surrounding today. -A number Display the number of months after the current month. -B number Display the number of months before the current month. -C Switch to cal mode. -N Switch to ncal mode. -d yyyy-mm Use yyyy-mm as the current date (for debugging of date selection). -H yyyy-mm-dd Use yyyy-mm-dd as the current date (for debugging of highlighting). A single parameter specifies the year (1-9999) to be displayed; note the year must be fully specified: ``cal 89'' will not display a calendar for 1989. Two parameters denote the month and year; the month is either a number between 1 and 12, or a full or abbreviated name as speci- fied by the current locale. Month and year default to those of the current system clock and time zone (so ``cal -m 8'' will display a calen- dar for the month of August in the current year). Not all options can be used together. For example ``-3 -A 2 -B 3 -y -m 7'' would mean: show me the three months around the seventh month, three before that, two after that and the whole year. ncal will warn about these combinations. A year starts on January 1. Highlighting of dates is disabled if stdout is not a tty. SEE ALSO
calendar(3), strftime(3) HISTORY
A cal command appeared in Version 5 AT&T UNIX. The ncal command appeared in FreeBSD 2.2.6. AUTHORS
The ncal command and manual were written by Wolfgang Helbig <helbig@FreeBSD.org>. BUGS
The assignment of Julian-Gregorian switching dates to country codes is historically naive for many countries. Not all options are compatible and using them in different orders will give varying results. BSD
March 14, 2009 BSD