fork download
  1. #!/bin/bash
  2. text='-rwxr--r-- 1 bob123 bob123 0 Nov 10 22:48 /path/for/bob123/dir/to/file.txt'
  3. owner='bob123'
  4. echo "${text%%$owner*}$owner"
  5. # => -rwxr--r-- 1 bob123
  6.  
Success #stdin #stdout 0s 4332KB
stdin
Standard input is empty
stdout
-rwxr--r-- 1 bob123