Sponsored Content
Top Forums UNIX for Advanced & Expert Users Substitution when special charcters involved Post 302257843 by zaxxon on Thursday 13th of November 2008 07:37:17 AM
Old 11-13-2008
Escape the special characters with a backslash:

Code:
echo "Bob's birthday 13/11/08 (today)"|\
sed 's/13\/11\/08 (today)/14\/11\/08 (tomorrow)/'
Bob's birthday 14/11/08 (tomorrow)

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help! a free Sprite is involved!

Can anyone define the following for me? /etc/rc.c/init.d/iptables restart Our resident "Geek" is giving away a prize if I can tell him what this means. (5 Replies)
Discussion started by: txyzzy
5 Replies

2. HP-UX

How to check patches involved

Hi I need to check if the following patches are installed in a HP-UX machine "GOLDQPK11i, which in turn includes both GOLDAPPS11i and GLODBASE11i How can I go about doing it, am still a struggling sys admin! Saw this command showrev -p but command not found in the machine thou! Thanks... (3 Replies)
Discussion started by: gelbvonn
3 Replies

3. Solaris

Handling Special Charcters

Dear All, I have created a UTF-8 database to store multi-lingual charcters. Below is the query from which i insert from Winsql (front-end third party database browser tool), the data gets inserted properly. insert into a (no, lbl) values (1, "Cliquez ici pour revenir Ã_ la recherche de... (2 Replies)
Discussion started by: lloydnwo
2 Replies

4. UNIX for Advanced & Expert Users

remove charcters

How do i remove single quotes(') from a file. Can we use sed for it (2 Replies)
Discussion started by: kris01752
2 Replies

5. UNIX for Advanced & Expert Users

Line Longer Than 2048 Charcters

I have a csv file with a record size of greater than 2048.So when i try to open the file in VI..This is the error i get (test.csv" A line cannot be longer than 2048 characters) Is there a way i can change this parameter to read a bigger line (2 Replies)
Discussion started by: kris01752
2 Replies

6. Shell Programming and Scripting

cat in linux, file holding special charcters

Hi I'd like to cat, in linux, a file that holds special charcters, like "-->" and ">" and "]" For example I have a file named test123.txt it looks like this: 2008-09-11 00:27:01,496 - < 0 > --> Start calculation of pattern , Pattern was split to pattern graphs < 0 > System Tqls Optimizer... (5 Replies)
Discussion started by: liav
5 Replies

7. Solaris

nestat on server involved in high traffic network

Hi All My Server is doing a very intense netowrk traffic operations and the cards are under very high pressure. I need to call NETSTAT on the shell. Do you know whether this command, under high pressure, might have some impact on the server traffic or can I proceed without any problem? (2 Replies)
Discussion started by: manustone
2 Replies

8. UNIX for Dummies Questions & Answers

Meta charcters

Find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (0 Replies)
Discussion started by: Phaneendra G
0 Replies

9. Homework & Coursework Questions

Meta charcters

find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (1 Reply)
Discussion started by: Phaneendra G
1 Replies

10. Shell Programming and Scripting

awk statement to grep (bit involved)

Hellow: I have the following data. id1 xxx xxx xxx id1 xxxx xxx xxx id2 xxx xxx xxx id2 xxxx xxx xxx id2 In my awk script which reads the file containing the above data I have the following code: myline=<inputdata> which is shown above What I am trying to find out is how may... (5 Replies)
Discussion started by: wincrazy
5 Replies
calendar(1)							   User Commands						       calendar(1)

NAME
calendar - reminder service SYNOPSIS
calendar [-] DESCRIPTION
The calendar utility consults the file calendar in the current directory and writes lines that contain today's or tomorrow's date anywhere in the line to standard output. Most reasonable month-day dates such as Aug. 24, august 24, 8/24, and so forth, are recognized, but not 24 August or 24/8. On Fridays and weekends "tomorrow" extends through Monday. calendar can be invoked regularly by using the crontab(1) or at(1) commands. When the optional argument - is present, calendar does its job for every user who has a file calendar in his or her login directory and sends them any positive results by mail(1). Normally this is done daily by facilities in the UNIX operating system (seecron(1M)). If the environment variable DATEMSK is set, calendar will use its value as the full path name of a template file containing format strings. The strings consist of conversion specifications and text characters and are used to provide a richer set of allowable date formats in dif- ferent languages by appropriate settings of the environment variable LANG or LC_TIME; see environ(5). Seestrftime(3C) for the list of allowable conversion specifications. EXAMPLES
Example 1: Possible contents of a template The following example shows the possible contents of a template: %B %eth of the year %Y %B represents the full month name, %e the day of month and %Y the year (4 digits). If DATEMSK is set to this template, the following calendar file would be valid: March 7th of the year 1989 <Reminder> ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of calendar: LC_CTYPE, LC_TIME, LC_MES- SAGES, NLSPATH, and TZ. EXIT STATUS
0 Successful completion. >0 An error occurred. FILES
/etc/passwd system password file /tmp/cal* temporary files used by calendar /usr/lib/calprog program used to determine dates for today and tomorrow ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
at(1), crontab(1), mail(1), cron(1M), ypbind(1M), strftime(3C), attributes(5), environ(5) NOTES
Appropriate lines beginning with white space will not be printed. Your calendar must be public information for you to get reminder service. calendar's extended idea of ``tomorrow'' does not account for holidays. The - argument works only on calendar files that are local to the machine; calendar is intended not to work on calendar files that are mounted remotely with NFS. Thus, `calendar -' should be run only on diskful machines where home directories exist; running it on a disk- less client has no effect. calendar is no longer in the default root crontab. Because of the network burden `calendar -' can induce, it is inadvisable in an environ- ment running ypbind(1M) with a large passwd.byname map. If, however, the usefulness of calendar outweighs the network impact, the super- user may run `crontab -e' to edit the root crontab. Otherwise, individual users may wish to use `crontab -e' to edit their own crontabs to have cron invoke calendar without the - argument, piping output to mail addressed to themselves. SunOS 5.10 1 Feb 1995 calendar(1)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy