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
Code in SQL 2000 not parsing/running in SQL 2005 Query Analyzer
Rpc over Https
Blackberry not activinating on BES
Need solution to convert Java 1.6 application into C# project
Event ID 37 Microsoft-Windows-Kernel-P
rocessor-P
ower
3 long beeps
Sysprep service pack 3
SBS 2008 How to Change the Company web Page Calender Date Format
How to connect to Oracle 11g as "SYS" from PB
COUNT_variable Error