6

bash script change a word into a file

view full story
linux-howto

http://askubuntu.com – I have a file like this: PRODUCT: $name | YEAR: $year | TYPE: $type PRODUCT2: $name2 | YEAR: $year | TYPE: $type2 PRODUCT3: $name3 | YEAR: $year | TYPE: $type PRODUCT4: $name4 | YEAR: $year | TYPE: $type3 PRODUCT5: $name5 | YEAR: $year | TYPE: $type PRODUCT6: $name6 | YEAR: $year | TYPE: $type PRODUCT7: $name7 | YEAR: $year | TYPE: $type3 PRODUCT8: $name8 | YEAR: $year | TYPE: $type2 And i want to change a specifiy field. For example i want to change the type of PRODUCT5 from $type to $type2 but i don't want to replace the whole line, only the field i'd like to change!Is this possible? (HowTos)