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
Iphone Can't get Exchange mail on LAN but ok on 3G.
netapp change active directory domain
snoop command with IP Clustered
Importing a text file into Access
VNC on Windows 7 (64)
Scanstyles does nothing in Webkit/Firefox
Access chart sorting
Random emails not arriving in Outlook 2007
Design issue, storing date from /proc
jQuery UI Dialog with ASP.Net Postbacks