Write a command to redirect the lines which contains the word "birbal" from the file "sample.Txt" to the file "redirlines.Txt".
Answers
Answer:
grep "Birbal" sample.txt>redirlines.txt
Explanation:
> is used to redirect the lines from files sample.txt to redirlines.txt
Given : the lines which contains the word "birbal" from the file "sample.Txt" to the file "redirlines.Txt".
Answer:
There are the answer is "sample.txt" to the file "redirlines.Txt".
Explanation:
To Find - Write a command to redirect the lines are word "birbal" from the file "sample.Txt" is to the file "redirlines.Txt".
write a command lines move to the file than,
"sample.txt" that include in the word "Birbal" to
the file "redirlines.txt."
grep creates desired file2 but doesn't modify file1 because
grep 'bar' file1 > file2
sed -i modifies desired file1 but don't create to file2
sed -i '/bar/d' file1
out of curiosity and to make a script more brief, an one line command to redirect the lines which contains.
#SPJ2