Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0314· openaiHugging Face Suzhen/CodeChat

I need a cmd line code that would delete the strings "Q Sub-total:" and "Grand Total:"…

  1. User

    I need a cmd line code that would delete the strings "Q Sub-total:" and "Grand Total:" from a textfile on widnows

  2. Assistant

    You can use the findstr command with the /V option to delete specific strings from a text file. Here's the command you need:

    findstr /V /C:"Q Sub-total:" /C:"Grand Total:" input.txt > output.txt
    

    This command will search for lines that do not contain the specified strings in input.txt, and write the result to output.txt. Replace input.txt and output.txt with your actual file names.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.