Hi
I have below sed to search and print particular line that matches in file and prints it, which is actually working fine as expected.
but if I replace date with the variable it seems it's not recognizing it and throwing out error
so can anyone help me resolving this??
I have below sed to search and print particular line that matches in file and prints it, which is actually working fine as expected.
Code:
sed -n "/^2012-11-19 23:[0]*/p" filename
Code:
v="2012-11-19"
sed -n 's/^'$v' 23:[0]*/p" filename
sed -n "s/^$v 23:[0]*/p" filename