Pseudocodeprintf Masi \nwas \nhere > /tmp/2sed -i 1i \tword \t 'include word' /tmp/2Expected output: tab before the first word. Output: tword   'include word'. Trying to use variable to solve the too-few-ticks-problemprintf masi \nwas \nhere > /tmp/2sentence=\tword \t 'include word'sed -i 1i $sentence /tmp/2Output: same problem tword    'include word'. 
Why you cannot have Tab in sed -i 1i \t 'word' file?
sed
With GNU sed:sed -i '1i\\t'$sentence /tmp/2orsed -i 1i\\\t$sentence /tmp/2The text to insert starts after the first \. Single-quote the sed script to stop your shell from doing thing with the \t (or insert yet another \ as in the second example above). With single quotes, concatenate $sentence with the sed script so that it gets expanded by the shell.