I have a file temp.txt. Here wanted to replace comma(,) with || between Select and From keyword.select emp_name,       emp_id,       locfrom   emp_join ,       emp_locwhere emp_join.id = emp_loc.id and  join_date > to_date('2015-01-01','YYYY-MM-DD')UNIONselect emp_name,       emp_id,       locfrom   emp_term,       emp_locwhere  emp_term.id = emp_loc.idand   term_date = to_date('2015-01-01','YYYY-MM-DD'); I am using -  sed command - sed 's/,/||/g' temp.txt -  but its replacing all comma in the file. Is there a simple unix command that will allow me to do this?How to do it using sed. 
Using sed how to replace comma before a specific string
shell script;sed