5. Testing the example
-
Let's see the usage of the program:
./sys_info.sh -h./sys_info.sh --help -
We see that we can also call it without any parameters. Let's try it:
./sys_info.sh
./sys_info.sh > report1.html
lynx report1.html
Exit with qy
-
We can write the output to a file using the option
-for--file:./sys_info.sh -f report2.htmlcat report2.html./sys_info.sh --file report3.html -
Let's also try the interactive method:
./sys_info.sh -i- Enter the name of the output file as
report1.html - Press
nfor not overwriting the existing file. - Enter the new name of the output file as
report2.html - Press
yfor overwriting the existing file.
./sys_info.sh --interactive- Enter the name of the output file as
report3.html - Press
nfor not overwriting the existing file. - Enter the new name of the output file as
report4.html
lynx report4.htmlExit with
qy - Enter the name of the output file as
Download lesson12/part5.cast
Loading asciinema cast...