shell conversion

vsu at mprvaxa vsu at mprvaxa
Thu Aug 4 08:58:55 AEST 1983


	My thanks to Messrs. Natalie,Callow,Gwyn,Weiser,Harris and Kraines for
	their responses.  The list below shows the kind of thing I'm looking for
	but of course it's not complete. If it were, one could write a program
	to convert shells (almost)

		PWB SHELL			BOURNE V7 SHELL
		---------                       ---------------	
                                                                                
    1.                               | Must have #! /bin/sh as first line else
                                     | gets treated as C shell.                 
                                     |                                          
    2.   = a ""                      | a=""                                     
                                     |                                          
    3.  if "$n" -gt 0 then           | if test "$#" -gt 0; then...              
        $n is nb. of parms to shell  | Must use test and $n--> $#               
                                     |                                          
    4.  endif                        | fi                                       
                                     |                                          
    5.  ; 'comment'                  | # comment
                                     |                                          
    6.  echo "string \c"             | echo -n "string"                         
                                     |                                          
    7.  expr arg | = c               | c=`expr arg`
                                     |                                          
    8.  savoir faire                 | je ne sais quoi                          
                                     |                                          



More information about the Comp.unix.wizards mailing list