String manipulation using UNIX commands
Extract substring based on index.
e.g.
first_name=Jayanthi
short_name=${first_name:0:3}
echo $short_name
Output: Jay
Replace all occurrences of a text
:%s/search_string/replacement_string/g
Extract substring based on index.
We usually assign some value to a variable and reuse the variable. There could also be situations where we need the variable name when value is passed.
Create a file named servers with the following
eval is a nice function and particularly useful to resolve the value of nested unix variables properly. Here is a scenario.
NTP Setup in RHEL