| www.delorie.com/gnu/docs/gcal/gcal_38.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
txt2gcal The Txt2gcal program creates a verbatim Gcal resource file from a text file. Its arguments are as follows:
txt2gcal [--help | --version] | [text-file|-] [date-part] |
If no text-file argument is given or/but a single `-' character, the program reads and processes all input received from the standard input channel. If no date-part argument is given, Txt2gcal creates a `0' for the date part. All results are always shown on the standard output channel. An exit status of 0 means all processing is successfully done, any other value means an error has occurred.
The program accepts the following options:
Here comes an example how to use Txt2gcal. Let us suppose there is a text file by the name of `tdemo-1.txt' with the following contents:
$ cat tdemo-1.txt -| Hi friends, -| -| I'm the demo text containing funny characters and character -| sequences like ~~ \~ % %% $a $1 %%%\ -| %\ %s %%foo %bar \%Baz \\~ \~\ and so on... -| I'm be anxious how I'll be transformed by `txt2gcal'. -| |
and Txt2gcal processes this file, redirecting the output to `tdemo-1.rc':
$ txt2gcal tdemo-1.txt 0*d1#999 > tdemo-1.rc $ cat tdemo-1.rc -| 0*d1#999 \ Hi friends,~\ -| ~\ -| I'm the demo text containing funny characters and character~\ -| sequences like \~\~ \\~ % %% \$a $1 %%%\ ~\ -| %\ \%s %\%foo \%bar \\%Baz \\\~ \\~\ and so on...~\ -| I'm be anxious how I'll be transformed by `txt2gcal'.~\ |
then Txt2gcal has now created a new Gcal resource file `tdemo-1.rc' from the text file `tdemo-1.txt'. Let us finally see, how Gcal will interpret this new resource file:
$ gcal %19960101 -H no -Ax -f ./tdemo-1.rc -| -| Mon, Jan 1st 1996: -| Hi friends, -| -| I'm the demo text containing funny characters and character -| sequences like ~~ \~ % %% $a $1 %%%\ -| %\ %s %%foo %bar \%Baz \\~ \~\ and so on... -| I'm be anxious how I'll be transformed by `txt2gcal'. -| |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |