December 1999
Beginner
528 pages
11h 10m
English
We have already seen most of the code for amending a record. We saw this code when we looked at record deletion.
When the correct record has been found, we simply assign all the record field variables to a temp variable then, using the default assignment variable:
: {default_variable:=variable}
The user can simply hit return on the fields he or she does not want to change. The default value will then replace the temp variable. Any amendments can be made simply by typing the new values in the adjacent fields.
echo -n -e "EMPLOYEE NO: $CODE\n"
echo -n "FIRST NAME : [$F_NAME] >"
read _F_NAME
: ${_FNAME:=$F_NAME}
...
The actual updating of the file is carried out using grep with the -v option again. All records apart from ...
Read now
Unlock full access