# set the #prev and #next fields of a file to the two args sed s/#prevf/$1/ | sed s/#nextf/$2/