Hello again
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
output=$(grep "$strID" recordDatabase)
recordExists=findRecord $strID
#code will go here to check that recordExists returns a value.....
I hope what I am trying to do makes sense, the function findRecord searches the file for examples which match the ID. This works fine.
I simply need to store the returned value of findRecord $strID in recordExists.
Thanks in advance
Mikey