| 1. |
Solve : want to search a string including quotes in DOS? |
|
Answer» i want to find a string whcih is in quotes I want to find and CHANGE a string which is in quotes Code: [Select]rem ECHO off findstr "\"80\"" file1.txt findstr "80" quotefile.txt | sed 's/"//g' findstr "80" file1.txt | sed 's/"//g' Output: C:\batch>quotefind.bat C:\batch>findstr "\"80\"" file1.txt 1233"80"12345 C:\batch>findstr "80" quotefile.txt | sed 's/"//g' 12338012345 C:\batch>findstr "80" file1.txt | sed 's/"//g' 12338012345 C:\batch> Input: C:\batch>type file1.txt 1233"80"12345 C:\batch> _____________________________ C:\batch>type file1.txt 1233"80"12345 C:\batch>findstr 80 file1.txt 1233"80"12345 _______________________ C:\batch>grep 80 file1.txt File file1.txt: 1233"80"12345 C:\batch>grep "80" file1.txt File file1.txt: 1233"80"12345 C:\batch> |
|