Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lastlogLatest() {
- last -n 1 "${userName}" | awk ' {
- for( i=1;i<=NF;i++ ) {
- if ( $i ~ /Mon|Tue|Wed|Thu|Fri|Sat|Sun/ ) {
- j = 0
- str = ""
- for ( j=i; j<=NF;j++ ) {
- str = ( str ? (str FS $j):$j )
- }
- print str
- break
- }
- }
- }'
- }
Add Comment
Please, Sign In to add comment