Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - linux rounding linux rounding
linux rounding linux rounding

How to intercept a string in Linux shell programming?

Briefly introduce the detailed methods of Shell string interception, such as intercepting the specified number of words, intercepting according to the specified string, and splitting according to the specified requirements.

1. Linux shell intercepts the first 8 digits of character variables. The methods are as follows: 2. Intercept according to the specified string 1. The first method: ${varible##*string} intercepts the string after the last string from left to right ${varible#*string} intercepts the string after the first string from left to right ${varible%%string*} intercepts the string after the last string from right to left ${varible%string*} starts from right The string "*" after the first string is intercepted from the left is just a wildcard and can be omitted. 3. Split according to the specified requirements: such as getting the suffix name

What is the rounding command symbol?

The rounding command is the standard command for taking the main integer