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
auto run lightbox
UltraTree and Filtering ?
Update Panel not loading DropDown
DOS print to PDF ?
Using 3rd Party SSL to Setup Exhange 2007, Outlook 2007, Server 2003 with Terminal Services
'SettingsSingleFileGenerat
or' 'ResXFileCodeGenerator' problem
Any best tool to copy users profile during server/domain migration ?
added shortcut to Public Desktop but some users not getting it - Win 2008 R2 Terminal Server
I need a help to make a small project with autocomplete functions
Auto fill user name in "Login" field