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
Custom Control Designer Error
.Net Application Security problem
How do I lookup and insert the foreign key value into a table when passing a variable value from different column in the related table?
Should I make a Drupal Theme from scratch?
PXE-E55: ProxyDHCP service did not reply to request on port 4011 Using SCCM 2007
How can I prevent changes to web browser proxy settings?
How can I reference information from one sheet to another by values selected in a drop down menu
Counting number of days between two dates using C#
How to store a set in a field and how to maintain it dyamically?
Passing combobox var to loaded swf as3