====================================================================== ====================================================================== Programming: short demo-files For some programming languages, demo files are provided, which do more or less the same thing. First a database is written to a file. It has 5 records and each record has 4 fields. The script reads each line in the generated file and isolates the fields (items). System calls are used to make a temporary trash file. To test floating numbers and math functions the y=sin(x) is calculated for x=1:360 degrees. Value-pairs x,y are written to a file. to test: => go to a temporary directory => download the dem-file with wget or from the browser => execute the demo ---------------------------------------------------------------------- The calculated xy-values can be plotted with gnuplot. To plot yx-values with gnuplot: => download and execute the gnuplot script wget -O dem-gnuplot.gnp https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-gnuplot.gnp gnuplot dem-gnuplot.gnp ====================================================================== #### bash shell script wget -O dem-bash.sh https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-bash.sh source dem-bash.sh #### Perl wget -O dem-perl.pl https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-perl.pl perl dem-perl.pl #### Python; python2 can be other version wget -O dem-python.py https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-python.py python2 dem-python.py #### C wget -O dem-c.c https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-c.c gcc dem-c.c && ./a.out #### Fortran-77 wget -O dem-f77.f https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-f77.f $FORTRAN-COMPILER dem-f77.f && ./a.out #### Pascal wget -O dem-pas.pas https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-pas.pas $PASCAL-COMPILER dem-pas.pas #### Octave (Matlab); plot is included; eps- and jpg-files are written wget -O dem-matlab.m https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-matlab.m octave dem-matlab.m #### lua wget -O dem-lua.lua https://raw.githubusercontent.com/pjgsch/tools/main/tpl/dem-lua.lua lua dem-lua.lua ====================================================================== Programming: extended demo-files. Here are some extended demo-files. They do not all the same things, but can be used to change and test things. #### Perl wget -O demext-perl.pl https://raw.githubusercontent.com/pjgsch/tools/main/tpl/demext-perl.pl perl demdemext-perl.pl #### C wget -O demext-c.c https://raw.githubusercontent.com/pjgsch/tools/main/tpl/demext-c.c wget -O IN.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/test-txt2.txt $C-COMPILER demext-c.c &&.a/out #### Fortran-77 wget -O demext-f77.f https://raw.githubusercontent.com/pjgsch/tools/main/tpl/demext-f77.f $FORTRAN77-COMPILER demext-f77.f && ./a.out #### html wget -O demext-html.html https://raw.githubusercontent.com/pjgsch/tools/main/tpl/demext-html.html #### demext-html.html : open in browser #### xfig wget -O demext-xfig.xfig https://raw.githubusercontent.com/pjgsch/tools/main/tpl/demext-xfig.fig #### demext-xfig.fig : open in xfig ====================================================================== Documentation and command examples: open in browser https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-bash.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-c.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-dos.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-f77.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-gnuplot.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-html.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-LO-calc.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-matlab.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-ment.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-octave.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-pas.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-pl.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-tex.txt https://raw.githubusercontent.com/pjgsch/tools/main/tpl/doc-vi.txt ======================================================================