Use sed to delete lines between text phrases

How to remove lines from stdin between and including the 2 lines as fields in a sed expression:

sed "/textline1/,/textline2/d"

This will delete from the input all lines between a line containing the text ‘textline1’ and ‘textline2’.

If you have a / char in either textline entry then you should replace it with the two characters inside the quotes of: ‘\/’
Being “backslash forwardslash” <- with no space between the characters. FYI, Richard.

Posted in Sales | Tagged , | Comments Off on Use sed to delete lines between text phrases

Good intro/info on CoreOS: The Cloudcast (.NET): T…

Good intro/info on CoreOS: The Cloudcast (.NET): The Cloudcast #197 – Tectonic Shifts at CoreOS pca.st/e5vE

Posted in Tweets | 1 Comment

Some Bash-isms

Being a “code daily” type of open-source SysAdmin/Operations Manager, I’ll post here a ‘tricks & tips’ that I’ve found useful when using and programming in the Bash Shell.

This one notes how to replace a Bash variable name with another variable name. I know that the best practice here is to use one of the many forms of Arrays that Bash provides, but this is applicable to a situation where an Array is not available, and there’s a number of Bash variables containing data that are able to have their variable names computed/calculated. eg: getting passed a shell or process’ environment to a Bash script.

For example/to demonstrate:

# initialise
first_last1=10 ; first_last2=20 ; first_last3=30
# process
count=1
while [ $count -le 3 ]; do
TMP="first_last$count"
echo Variable named first_last$count = ${!TMP}
let "count+=1"
done

Yields results of:

Variable named first_last1 = 10
Variable named first_last2 = 20
Variable named first_last3 = 30

FYI,
Richard.

Posted in Network Presence, Rich | Tagged , | Comments Off on Some Bash-isms

RT @ZDNet: Raspberry Pi releases an official PC ca…

RT @ZDNet: Raspberry Pi releases an official PC case that costs less than $10 zd.net/1IPMIvV via @ZDNet & @teklust http://t.co/HSkPwjjz8f

CHx-BFkUsAI-nb6

Posted in Tweets | Comments Off on RT @ZDNet: Raspberry Pi releases an official PC ca…

Many issues & items involved in Postgres vs Mi…

Many issues & items involved in Postgres vs Microsoft SQL Server. pg-versus-ms.com

Posted in Tweets | Comments Off on Many issues & items involved in Postgres vs Mi…

Excellent news of a new Tier 3 Data Centre being b…

Excellent news of a new Tier 3 Data Centre being built by a good team in Adelaide, South Australia. adelaidenow.com.au/business/tech-…

Posted in Tweets | Comments Off on Excellent news of a new Tier 3 Data Centre being b…

The bullet-points in this Art of the Command Line…

The bullet-points in this Art of the Command Line would make good Interview questions for a Linux SysAdmin job. github.com/jlevy/the-art-…

Posted in Tweets | Comments Off on The bullet-points in this Art of the Command Line…

From @TechRepublic : Photos of 10 of the most uniq…

From @TechRepublic : Photos of 10 of the most unique Data Centres. techrepublic.com/pictures/the-1…

Posted in Tweets | Comments Off on From @TechRepublic : Photos of 10 of the most uniq…

Excellent post by Geoff Huston on “Multipath TCP”…

Excellent post by Geoff Huston on “Multipath TCP” in an IPv6 world & IPv4 Exhaustion this year. potaroo.net/ispcol/2015-06…

Posted in Tweets | Comments Off on Excellent post by Geoff Huston on “Multipath TCP”…

interesting discussion & info on wait states &…

interesting discussion & info on wait states & context switching timing in modern Linux kernels. stackoverflow.com/questions/1211…

Posted in Tweets | Comments Off on interesting discussion & info on wait states &…