Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: finding a friggin tab with sed or grep

  1. #11

    Re: finding a friggin tab with sed or grep

    Well, Pam i tried your technique but it doesnt seem to be working. I see what you are doing but wouldnt typing:
    tb='printf "\t"'
    just load *<printf \t> into the variable tb and then typing:
    grep "$tb" filename *would in turn just say:
    grep "printf \t" filename ?
    It's kind of academic now because Feztaa's method is by far the better one. I am actually using back ticks there. ie ` not '. They allow you to include the result of a command into a stream of text as though you had actually typed it. eg

    echo "hello `whoami`, how's it hanging?"

  2. #12

    Re: finding a friggin tab with sed or grep

    Oh, i gotcha! Well thanks for the work anyway--i still learned something! Have a great weekend everyone!

    -Morphman

  3. #13

    Re: finding a friggin tab with sed or grep

    Feztaa!! That worked PERFECTLY! That was exactly what i was looking for, some non-cryptic normal way to insert a tab into a normal expression. Thanks folks, you are awesome. I was beginning to believe id never have any closure to this problem. Ill be sticking with linuxjunior in the future! * WOOHOO!!
    Glad I could help

    PS2: How did you find that Feztaa? Im always looking for more access to help tables and websites..
    I dunno, it's just one of those things you learn from some obscure place, and then you never forget... CTRL-V is the quoted insert key, there are a lot of other things you can do with it. Try searching google.com/linux for 'quoted insert' or something.

    Actually, it would also work if you simply hit CTRL-V and then tab, just in case you can't remember CTRL-V CTRL-I.

  4. #14

    Re: finding a friggin tab with sed or grep

    TMTOWTDI!
    Feztaa's is probably still going to be easier, but I just combined what pam used into one command:
    Code:
    grep "`printf \"\t\"`" filename.ext # Notice the backticks, they're not apostraphes.

Similar Threads

  1. grep absolute path
    By svar in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 12-02-2010, 04:41 AM
  2. Using grep in my home directory
    By Clai2x in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 12-19-2007, 04:57 AM
  3. Using Grep and regex to pull a value out of a string
    By thestonefox in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 10-24-2007, 03:58 PM
  4. What does 'locate network grep howto' do?
    By Smegma in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 03-28-2004, 04:16 AM
  5. This is so Friggin FUNNY!!
    By in forum General Chat
    Replies: 2
    Last Post: 04-16-2003, 07:49 PM

Bookmarks

Posting Permissions

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