view counter

Servers & Storage Feed

Sun Servers and Storage, Solaris, Oracle Linux, Red Hat Linux, Oracle VM for x86, Oracle VDI and Virtualization resources, news, and support articles.

Vim case insensitive search

 
By default vim editor is enabled to search case sensitive search.
Example:
/linux
Above example will looks for linux only not Linux or LINUX.
To enable case insensitive search use \c at start/end of your search key word.
Example:
/\clinux
or
/linux\c
Any of above example will ignore case and will search for linux.

Vim case insensitive search

 
By default vim editor is enabled to search case sensitive search.
Example:
/linux
Above example will looks for linux only not Linux or LINUX.
To enable case insensitive search use \c at start/end of your search key word.
Example:
/\clinux
or
/linux\c
Any of above example will ignore case and will search for linux.

A New Challenge

About two years ago Joyent began offering Linux instances, running under KVM, stored on ZFS, and secured by Zones (“double hull virtualization”). Since then, I’ve been doing more and more work on Linux performance as customers deploy on these instances. It’s been fascinating to work on both the illumos and Linux kernels at the same time (a Linux guest in an illumos host), with full stack visibility of the guests, and hypervisor, down to metal.

How to find the MIME type of a file

Some MIME types can be intuitive - application/pdf for PDF files. However, not all MIME types are that easy to get exactly right - application/vnd.ms-excel for xls or Excel files. The following are different ways, using the command line, to identify the MIME type of a file.

  • xdg-mime $ xdg-mime query filetype somefile.xlsapplication/vnd.ms-excel
  • file $ file -b --mime-type somefile.xlsapplication/vnd.ms-excel

bash loop though multi line variable

 
I have a multi line variable in my bash script and wanted to iterate through each line of a variable.
To do this task I am using while loop.
Following is my variable:
var="a
b
c
d
e"

As I mentioned to loop through my multi line variable(var) I am using while as shown below:
while read -r line
do
echo "line: $line"
done <<< "$var"

Just carefully observer last line in above code, here I am using three less than symbols(<<<) and variable in double quotes.

bash loop though multi line variable

 
I have a multi line variable in my bash script and wanted to iterate through each line of a variable.
To do this task I am using while loop.
Following is my variable:
var="a
b
c
d
e"

As I mentioned to loop through my multi line variable(var) I am using while as shown below:
while read -r line
do
echo "line: $line"
done <<< "$var"

Just carefully observer last line in above code, here I am using three less than symbols(<<<) and variable in double quotes.

view counter