Microsoft
Software
Hardware
Network
Question : How to use dynamic variables in sed
how do i use dynamic variables in sed;
eg:
a=1
sed -ne '1p'
What if i wanted to use $a in the sed expression.
I dont know the syntax of it.
Answer : How to use dynamic variables in sed
I think you are using sh or bash.
sed -be 1p does exactly the same such as head -n 1
which is print the first line.
If you want to pas the number as variable, this:
a=1
sed -ne "$a"p filepath
would work. I tested.
Random Solutions
instance_resources
Get earliest and latest dates in a Listview
How do I change the style.css with Javascript?
Group Policy - domain controllers
Rebuild SBS 2008 server
Using RegExp to Simulate Like
Setting Reporting Services data driven subscription Using Web Service
Getting Security Error when using GoDaddy Coldfusion and cfajaximport
How can I send HTML formatted emails to someone who signs up on my site
solution in SSMS