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
I need to query each group in an OU in the Root Domain and get the group names that has exact identical users.
IIS 7 - setting up the site with www.
Citrix not finding the license server
not seeing auto-recover version of a force-closed excel (2007) document
Sync Access database contacts with Exchange Contacts list
backup multiple DBs in script
To Lock my pendrive
Globally Hide Mouse after Inactive without using constantly running Timer Interval
Having issues converting Physical ISA server to Virtual Server
Ubuntu svn: Network connection closed unexpectedly