I am trying to replace a string ::: with :: for all lines in a batch of txtfiles (it can be considered as a word since there\'s always a space in front
:::
::
A simple loop to process each file with sed should suffice.
sed
for inp in ./td/*; do fname=${inp##*/} sed 's/:::/::/g' "$inp" > ./od/"$fname" done