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
Asp.net ajax error. the same if 'mdPopup' cannot be added to the application.
log4c practice
Can't Mount or Delete Public Folders Exchange 2010
Uninstalling DFS Service
WEBBRICK
Designing a Graphic Environment
Check if EJB is invioked
Forefront TMG source IP address spoofed issue
Wyse thin client and Citrix display/graphic lag
Dell Poweredge 1800 SBS 2003 reboots at 'Applying Computer Settings'