Is there a way of finding out if an issued sed command is successful?
Basically, in my script I have a command where mydata=$(cat record | sed '...command here...'). When the sed command finds the data that I am after it is assigned to mydata. When the sed command does not find the data I am after, xxxx is assigned the whole contents of the file, which is expected. I am processing a file using a while loop. I was wondering if an indicator is set to indication success or failure.