Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all, I'm writing a shell script that reads in the contents of a file. While reading in the contents I want it to strip out all of the file's ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    18

    Stripping out a certain character from a file

    Hi all,

    I'm writing a shell script that reads in the contents of a file. While reading in the contents I want it to strip out all of the file's " marks (double quotations) from the output. I've been researching and attempting to do so, but with my limited Linux knowledge I've yet to be successful.

    What Linux command can I use to do so? And how do I word it?

    Thanks,
    James

  2. #2
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    845
    You can use the command tr like so:

    Code:
    tr --delete \"
    This is untested so let me know if you have any errors
    Linux User #453176

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    18
    It worked

    & I've learned a new command. Thank You.

  4. #4
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    you can also try
    sed 's/"//g'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...