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
Can I force reconciliation of old email after blackberry enterprise activation?
Exchange 2003 and 2010 coexistent - Outlook in 2010 cannot email to 2003
Photoshop - picture blurring
How do I add my read-only attribute back with a .vb script
sql - date
SBS 2008 move data feature crashes
Cant get vista to view my web site correctly!
Difference between Exchange 2010 archiving and Evault archiving
MS CRM Duplicate Detection rule not working
DELPHI 2010 -- INDY 9 or INDY 10