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
Exchange 2010 RPC error
Need to uninstall winzip using group policy
How to Stop Procedure Running after Message Box Displayed
get 550 5.7.1. Unable to relay for specific domains....
Ethernet crossover cable connect
Windows Server 2008 R2: missing start menu of installed applications
RadCombo Box loses Items on postback.
Windows 2008 DC and IP Default Gateway settings
Problem with EFS Recovery
split comma delimited values into seperate columns in SQL 2005