1

sed - searching token in certain order

view story
linux-howto

http://www.unix.com – Hello. I would like to write a bash function which would return "true" if the search succeed else return anything else. something like Code: if [[ "$(my_funct  a_file_name  a_token1  a_token2  a_token3 a_token4)" != "true" ]] ; then     exit 1 fi function my_funct () {     find first occurrence $2 in $1     if not found return "false"     from that position, find first occurrence $3 in any following line           but before founding $5       (HowTos)