Hi Folks,
How do I pass a variable on sed (as a regular expression)???
I need to use a variable as a regexp in a sed command. The variable happens to be a time stamp which I fetch from another command.
To illustrate:
Suppose the value of variable var is....
var=10:20:22
I notice that this command doesn't work:
sed '1,/$var/d' textfile1
(I'm trying to delete the first line upto the first instance of var in the file textfile1.
Please help...tnx!