First, compile and generate the library file libapue.. According to README, it is easy to change the directory to make, but there are still errors in centos. Solve the problem through the following blog post <apue. h error in advanced programming in UNIX environment>.
However, since apue routines are named in the format of fig1.3, the compiler does not know the file when gcc-O myls fig1.3 liabapue. A is compiled...
Therefore, the name is changed to fig1_3.c. However, a large number of scripts are written for implementation.
1 #! /Bin/bash 2 3 for (I = 1; I <= 20; I ++) 4 do 5 for (j = 1; j <= 50; j ++) 6 do 7 myfile = "/home/AFU/apue.2e/FIG $ I. $ J "8 if [-F" $ myfile "]; 9 then 10 CD/home/AFU/apue.2e/11 MV fig $ I. $ J fig $ I % _ $ J. C 12 fi 13 done 14 done
The script only implements the name change function. No compilation commands are added.
Compile apue routine in centos-solve the error and rewrite the example name.