Horje
bash get last field in line Code Example
bash get last field in line
Use rev command altogether with cut command as follows:
echo "a1 a2 a3 a4 a5" | rev | cut -d ' ' -f '1' | rev
#rev reverses string, then you cut from 2th field to end and reverse back




Shell

Related
ubuntu list running applications Code Example ubuntu list running applications Code Example
how to install cmatrix Code Example how to install cmatrix Code Example
fail2ban apt Code Example fail2ban apt Code Example
bash split and get last Code Example bash split and get last Code Example
split and get last Code Example split and get last Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13