Tip
replacing string within file (linux)
perl -i~ -pe 's/abc/def/g' filename
Will replace the string abc with def in the file itself, and generate a backup of the original file in filename~. This command reads text from the file filename and writes it back into the same file where every occurrence of the string abc is replaced by def. The original contents of filename are copied into the file filename~.
Comments
posted at 2006-04-08 by maozdan
linux rulz !! :)
Add comment