Regular Expressions Linux Questions

1. The following / etc / passwd first column and the last column of each row of all swap positions.

 

 

 answer:

1) After use sed to quote

 

 

2)awk -F ":" '{print $7":"$6":"$5":"$4":"$3":"$2":"$1}' /etc/passwd

 

 

Guess you like

Origin www.cnblogs.com/dongxu2019/p/11567000.html