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 critical function required for the transfer of delivery of the message was not supported by the originator of the report
Jumbo frame configuration is saved where?
TS users access maping folders in windows 2008 slow
How can I sign certificate request using java.security or Bouncycastle programmatically?
Access: 'Control can't be edited - bound to unknown field'
windows 7 home password policy
Making a movie project into a DVD file in Windows 7. How do I burn copies in Vista?
A non-SYN packet was dropped because it was sent by a source that does not have an established connection with the Forefront TMG computer
Upgrade Exchange SP2 to SP3
Acer Aspire One internal speakers not working