# This is a comment line f1 = a b c # First line of tokens x y z # Second line of tokens aaa bbbb "cccc ddddd" # Last line of tokens
Run the following command:
txtcut -d: sample.txt
The txtcut command writes the following to stdout:
f1:=:a:b:c x:y:z aaa:bbbb:cccc ddddd
txtcut sample.txt | cut -f3
The following is written to stdout:
a z cccc ddddd
cat sample.txt | txtcut -d: | cut -f3 -d:
Again, the following is written to stdout:
a z cccc ddddd
txtcut -d: sample.txt
f1:=:a:b:c x:y:z aaa:bbbb:cccc ddddd
txtcut -d: -n sample.txt
sample.txt:f1:=:a:b:c sample.txt:x:y:z sample.txt:aaa:bbbb:cccc ddddd
txtcut -d: -l sample.txt
3:f1:=:a:b:c 4:x:y:z 5:aaa:bbbb:cccc ddddd
txtcut -d: -n -l sample.txt
sample.txt:3:f1:=:a:b:c sample.txt:4:x:y:z sample.txt:5:aaa:bbbb:cccc ddddd
txtcut -d: -n -l -c sample.txt
sample.txt:3:5:f1:=:a:b:c sample.txt:4:3:x:y:z sample.txt:5:3:aaa:bbbb:cccc ddddd