I have a question: Write a Linux sed command to save lines that match the pattern “number” (upper or lowercase) for the file: datat.txt and save results (overwriting previous contents) to: ~/results.txt
I use this command:
sed -n -i '/number/p' data.txt>~/results.txt
But when I use more command to look at results.txt file, it showed the empty text file. PLease let me know did I do wrong?