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
A servlet to handle and ajax get request?
WPF, VB.net, generating a multi column listbox from list (of type Structure)
Printing XSLT page in asp.net
VBA Excel User Form Input Validation
sysprep and answer file help with Windows 7
Dell desktop will not boot
Display data from MSAccess to table
Windows 2008 slow DNS server
restore from windows server backup and cannot run OS because of missing or corrupt ntoskrnl.exe
Office 2007 Word Docs Slow opening Over VPN