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
Mailbox Quota full
publishing websites in TMG 2010
VB.NET Setup Installing App Files Without Asking What Folder to Install
Does safari support sftp native?
How do I delete some lines in a text file?
Why won''t my computer access the Internet using IE after MSFT updates?
Should a misanthrope donate?
HTML - SQL - Carrying Form Variables from Page to Page
Outlook 2007 Continually asks for an Exchange Server password
asa static nat