I'm new to linux.I ask two questions,here are the commands:
echo 'fs4df2sf23d4f' | sed 's/2/4/g'
this only change 2 to 4,and I want to make the result as when number then number*2,how to write the expression?
cat test.txt | grep 123 > test.txt
when then I use cat a.txt
,the result shows nothing,it happens when cat A | grep * > A
if cat A | grep * > B;cat B > A
,the result is true,but if there is way that I don't use B?