#-------------------------------------------------------------------------------- # use shell variable within sed #-------------------------------------------------------------------------------- echo LIST OF SCRIPTS IN ${NFSBIN}; echo "================================"; ls -1 ${NFSBIN}/*.ksh | sed -e "s|"$NFSBIN"/||" #-------------------------------------------------------------------------------- # remove all possible spaces at the end of the line (-i => inline, and create .bak file) #-------------------------------------------------------------------------------- sed -i.bak 's/ *$//' file