I am trying to delete a numerical value once only from a file where there could be more than one instance of that value. file_input=
2  
4  
18  
8  
8  
10  
12  
14  
I need to delete '8' but only once and i want to keep '18'. The final result should be in file_output as such:
2  
4  
18  
8  
10  
12  
14  
I tried sed '/8/d', grep -v -w '8' and awk '$1 !=8' but they all delete 8, 8, and 18.
 
     
     
    