$ Cat Infydata

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Create a file infydata.

$> cat > infydata


1000:sundar:mysore
1001:eugene:chennai
1002:ajit:mysore
1004:hanumesh::::bangalore
1005:girish:mangalore
^d

$> cat infydata


1000:sundar:mysore
1001:eugene:chennai
1002:ajit:mysore
1004:hanumesh::::bangalore
1005:girish:mangalore
$> cat infydata | tr "a" "b"
1000:sundbr:mysore
1001:eugene:chennbi
1002:bjit:mysore
1004:hbnumesh::::bbngblore
1005:girish:mbngblore
In the above example, all occurrences of a have been changed to b.
$> cat infydata | tr -s ":" "#"
1000#sundar#mysore
1001#eugene#chennai
1002#ajit#mysore
1004#hanumesh#bangalore
1005#girish#mangalore
In the above example, multiple occurrences of : have been replaced by #.

You might also like