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
Adding one cell to the bottom of a named range defined byan OFFSET
Creating a Dynamic Form from SQL database tables in ColdFusion
broad cast message to win xp and win vista systems via Windows 2003 server
Error message when replying, sending, openning email in OWA
Creating a new Array and Logical Drive
Laptop running windows vista, SYSTEM process goes to 100% cpu after being accessed by any computer on the network.
Removing NOT NULL to a column doesn't work
In between Asterisk BLF
Cisco 877 DHCP not giving addresses
Trying to use recovery storage group to restore exchange database