On Fri, Jan 11, 2002 at 03:57:43AM -0800, Prasad Paranjape wrote:
> 
> Bish has written 2tgz utility to convert deb and rpm
> apackages to .tgz.
> 
> I was raeding the shell script and want to know how
> following piece of code works:
> 
> cat <<- -EOF-
> 
>      ${PROGNAME} ver. ${VERSION}      
> 
>      This is a program to Convert rpm and debian ....
>       
> -EOF-
> 

Yes, this is a  technique for output to  stdout  used  by  all 
shells and some scripting languages like perl. You  may  write
the full thing as statements, like:

echo "$PROGNAME                       $Ver. $VERSION"
echo
echo "    This is a program .... "  etc.

This would firstly be tedious, and you cannot format the thing
easily. To get fully formated text out, it is  easier  to  use
the technique used in the script. You may even take the output
to a file (instead of the screen) as follows:

----------<snip>-----------------------
cat <<- -Some_delimiter- > filename.txt

  This will be output to filename.txt

-Some_delimiter- 
---------</snip>-----------------------

HTH

Bish

--
:
####[ Linux One Stanza Tip (LOST) ]###########################

Sub : Line numbering your programs (#1)              LOST #139

Want a listing of your program with line numbers ? 
Try: nl -ba my_prog.c > my_prog.no.c
info or man nl for further details ...

####<[EMAIL PROTECTED]>####################################
:

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to