echo "bash g++.sh 2018 06 04 This debian 9.3 bash file runs some examples from http://www.cplusplus.com/doc/tutorial/."; PACKAGE2="g++"; IN2="cplusplus.com/doc/tutorial"; OUT2="Computer"; mkdir -p "${OUT2}"; echo " ${OUT2}/${PACKAGE2}.htm    Operating system used is debian 9.3. Package is ${PACKAGE2}. Example script is from http://www.cplusplus.com/doc/tutorial/.

" >> ${OUT2}/${PACKAGE2}.htm # echo "add paragraph header to index."; F8_cpp() { echo "

${P7}  ${LABEL7}" >> "${OUT2}/${PACKAGE2}.htm"; } F7_cpp() { mkdir -p ${OUT2}/${IN2}/${P7} cp ${IN2}/${P7}/${FILE7}.cpp ${OUT2}/${IN2}/${P7} g++ -std=c++0x ${OUT2}/${IN2}/${P7}/${FILE7}.cpp -o ${OUT2}/${IN2}/${P7}/${FILE7}.exe ${OUT2}/${IN2}/${P7}/${FILE7}.exe > ${OUT2}/${IN2}/${P7}/${FILE7}.txt rm -r ${OUT2}/${IN2}/${P7}/${FILE7}.exe echo "
${FILE7}    ${FILE7}.cpp    ${FILE7}.txt    ${LABEL7}" >> "${OUT2}/${PACKAGE2}.htm"; } # P7="200"; LABEL7="Introduction"; F8_cpp; # P7="210"; LABEL7="Compilers"; F8_cpp; # P7="300"; LABEL7="Basics"; F8_cpp; P7="310"; LABEL7="Structure of a program"; F8_cpp; FILE7="311"; LABEL7="my first program"; F7_cpp; FILE7="314"; LABEL7="my second program"; F7_cpp; FILE7="317"; LABEL7="my second program with more comments";F7_cpp; FILE7="318"; LABEL7="my second program"; F7_cpp; P7="320"; LABEL7="Variables and types"; F8_cpp; FILE7="321"; LABEL7="operating with variables"; F7_cpp; FILE7="322"; LABEL7="initialization of variables"; F7_cpp; FILE7="323"; LABEL7="my first string"; F7_cpp; FILE7="324"; LABEL7="my first string"; F7_cpp; P7="330"; LABEL7="Constants"; F8_cpp; FILE7="331"; LABEL7="Typed constant expressions"; F7_cpp; FILE7="332"; LABEL7="Preprocessor definitions"; F7_cpp; P7="340"; LABEL7="Operators"; F8_cpp; FILE7="341"; LABEL7="Assignment operator"; F7_cpp; FILE7="342"; LABEL7="Compound assignment"; F7_cpp; FILE7="343"; LABEL7="Conditional ternary operator"; F7_cpp; # echo "350 Basic Input/Output requires user input."; # P7="350"; LABEL7="Basic Input/Output"; F8_cpp; # FILE7="351"; LABEL7="Standard input"; F8_cpp; # FILE7="352"; LABEL7="cin and strings"; F8_cpp; # FILE7="353"; LABEL7="stringstream"; F8_cpp; # P7="400"; LABEL7="Program structure"; F8_cpp; # P7="410"; LABEL7="Statements and flow control"; F8_cpp; P7="420"; LABEL7="Functions"; F8_cpp; FILE7="421"; LABEL7="function example"; F7_cpp; FILE7="422"; LABEL7="function example"; F7_cpp; FILE7="423"; LABEL7="void function example"; F7_cpp; FILE7="424"; LABEL7="passing parameters by reference"; F7_cpp; FILE7="425"; LABEL7="default values in functions"; F7_cpp; FILE7="427"; LABEL7="factorial calculator"; F7_cpp; P7="430"; LABEL7="Overloads and templates"; F8_cpp; FILE7="431"; LABEL7="overloading functions"; F7_cpp; FILE7="432"; LABEL7="overloaded functions"; F7_cpp; FILE7="433"; LABEL7="function template"; F7_cpp; FILE7="434"; LABEL7="function templates"; F7_cpp; FILE7="435"; LABEL7="template arguments"; F7_cpp; P7="440"; LABEL7="Name visibility"; F8_cpp; FILE7="441"; LABEL7="inner block scopes"; F7_cpp; FILE7="442"; LABEL7="namespaces"; F7_cpp; FILE7="443"; LABEL7="using"; F7_cpp; FILE7="444"; LABEL7="using"; F7_cpp; FILE7="445"; LABEL7="using namespace example"; F7_cpp; FILE7="446"; LABEL7="static vs automatic storage"; F7_cpp; # P7="500"; LABEL7="Compound data types"; F8_cpp; P7="510"; LABEL7="Arrays"; F8_cpp; FILE7="511"; LABEL7="arrays example"; F7_cpp; FILE7="512"; LABEL7="arrays as parameters"; F7_cpp; # P7="520"; LABEL7="Character sequences"; F8_cpp; P7="530"; LABEL7="Pointers"; F8_cpp; FILE7="531"; LABEL7="my first pointer"; F7_cpp; FILE7="532"; LABEL7="more pointers"; F7_cpp; FILE7="533"; LABEL7="more pointers"; F7_cpp; FILE7="534"; LABEL7="pointers as arguments:"; F7_cpp; FILE7="535"; LABEL7="increaser"; F7_cpp; FILE7="536"; LABEL7="pointer to functions"; F7_cpp; # P7="540"; LABEL7="Dynamic memory"; F8_cpp; # P7="550"; LABEL7="Data structures"; F8_cpp; # P7="560"; LABEL7="Other data types"; F8_cpp; # P7="600"; LABEL7="Classes"; F8_cpp; P7="610"; LABEL7="Classes I"; F8_cpp; FILE7="611"; LABEL7="classes example"; F7_cpp; FILE7="612"; LABEL7="example: one class, two objects"; F7_cpp; FILE7="613"; LABEL7="example: class constructor"; F7_cpp; FILE7="614"; LABEL7="overloading class constructors"; F7_cpp; FILE7="615"; LABEL7="classes and uniform initialization"; F7_cpp; FILE7="616"; LABEL7="member initialization"; F7_cpp; P7="620"; LABEL7="Classes II"; F8_cpp; FILE7="621"; LABEL7="overloading operators example"; F7_cpp; FILE7="622"; LABEL7="non-member operator overloads"; F7_cpp; FILE7="623"; LABEL7="example on this"; F7_cpp; FILE7="624"; LABEL7="static members in classes"; F7_cpp; FILE7="625"; LABEL7="constructor on const object"; F7_cpp; FILE7="626"; LABEL7="const objects"; F7_cpp; FILE7="627"; LABEL7="overloading members on constness"; F7_cpp; FILE7="628"; LABEL7="class templates"; F7_cpp; FILE7="629"; LABEL7="template specialization"; F7_cpp; P7="630"; LABEL7="Special members"; F8_cpp; FILE7="631"; LABEL7="classes and default constructors"; F7_cpp; FILE7="632"; LABEL7="destructors"; F7_cpp; FILE7="633"; LABEL7="copy constructor: deep copy"; F7_cpp; FILE7="634"; LABEL7="move constructor/assignment"; F7_cpp; FILE7="635"; LABEL7="default and delete implicit members"; F7_cpp; P7="640"; LABEL7="Friendship and inheritance"; F8_cpp; FILE7="641"; LABEL7="friend functions"; F7_cpp; FILE7="642"; LABEL7="friend class"; F7_cpp; FILE7="643"; LABEL7="derived classes"; F7_cpp; FILE7="644"; LABEL7="constructors and derived classes"; F7_cpp; FILE7="645"; LABEL7="multiple inheritance"; F7_cpp; P7="650"; LABEL7="Polymorphism"; F8_cpp; FILE7="651"; LABEL7="pointers to base class"; F7_cpp; FILE7="652"; LABEL7="virtual members"; F7_cpp; FILE7="653"; LABEL7="abstract base class"; F7_cpp; FILE7="654"; LABEL7="pure virtual members can be called from the abstract base class"; F7_cpp; FILE7="655"; LABEL7="dynamic allocation and polymorphism"; F7_cpp; # P7="700"; LABEL7="Other language features"; F8_cpp; P7="710"; LABEL7="Type conversions"; F8_cpp; # FILE7="711"; LABEL7="implicit conversion of classes"; F7_cpp; # FILE7="712"; LABEL7="explicit"; F7_cpp; FILE7="713"; LABEL7="class type-casting"; F7_cpp; FILE7="714"; LABEL7="dynamic_cast"; F7_cpp; FILE7="715"; LABEL7="const_cast"; F7_cpp; FILE7="716"; LABEL7="typeid"; F7_cpp; FILE7="717"; LABEL7="typeid, polymorphic class"; F7_cpp; P7="720"; LABEL7="Exceptions"; F8_cpp; FILE7="721"; LABEL7="exceptions"; F7_cpp; FILE7="722"; LABEL7="using standard exceptions"; F7_cpp; # FILE7="723"; LABEL7="bad_alloc standard exception"; F7_cpp; P7="730"; LABEL7="Preprocessor directives"; F8_cpp; FILE7="731"; LABEL7="function macro"; F7_cpp; FILE7="732"; LABEL7="standard macro names"; F7_cpp; # P7="800"; LABEL7="Standard library"; F8_cpp; P7="810"; LABEL7="Input/output with files"; F8_cpp; # FILE7="811"; LABEL7="basic file operations"; F7_cpp; # cp example.txt ${OUT2}/${IN2}/${P7}/${FILE7}.txt; # FILE7="812"; LABEL7="writing on a text file"; F7_cpp; # cp example.txt ${OUT2}/${IN2}/${P7}/${FILE7}.txt; FILE7="813"; LABEL7="reading a text file"; F7_cpp; FILE7="814"; LABEL7="obtaining file size"; F7_cpp; FILE7="815"; LABEL7="reading an entire binary file"; F7_cpp; PATH2="usr/share/doc/g++" mkdir -p ${OUT2}/${PATH2} cp /etc/debian_version ${OUT2} echo "

debian version    version" >> ${OUT2}/${PACKAGE2}.htm; # g++ -v > ${OUT2}/${PATH2}/version.txt dpkg -L ${PACKAGE2} > ${OUT2}/${PATH2}/installed.txt # man ${PACKAGE2} > ${OUT2}/${PATH2}/manual.txt echo "
${PACKAGE2}    installed files" >> ${OUT2}/${PACKAGE2}.htm; cp ${PACKAGE2}.sh ${OUT2}/${PATH2} echo "
The script that created this.    ${PACKAGE2}.sh" >> ${OUT2}/${PACKAGE2}.htm; echo "" >> ${OUT2}/${PACKAGE2}.htm; echo; echo "${PACKAGE2} end.";