The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk command format ? maheshsri Shell Programming and Scripting 4 05-06-2009 09:31 AM
grep using date format ali560045 Shell Programming and Scripting 4 12-26-2007 08:59 AM
grep using date format ali560045 Shell Programming and Scripting 8 12-11-2007 06:39 PM
how to exclude the GREP command from GREP yamsin789 UNIX for Advanced & Expert Users 2 10-05-2007 03:59 AM
Format Command yestoprop69 UNIX for Dummies Questions & Answers 2 07-25-2001 01:47 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-17-2005
jasongr jasongr is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 11
how to format a grep command

Hello

I am trying to use the grap command to locate the following phrase in a file:
"file.php\tDebug: one two three"

Note that \t denotes a tab (whitespace) and not the characters \ and t

I am encountering the following 2 problems:
1) there is a perido between "file" and "php" which needs to be encoded somehow
2) there is a tab between "php" and "Debug" which needs to be encoded somehow

I would appreciate it if someone could some me what the correct syntax for this command should be

In a more general note, I would appreciate if someone could refer me to a manual on using grep, including character escaping

regards and thanks in advance
  #2 (permalink)  
Old 11-17-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,125
Put the whole thing in double quotes and put a backslash in front of the dot. For the tab, just hit the tab key.
  #3 (permalink)  
Old 11-18-2005
jasongr jasongr is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 11
Thanks Perderabo
I will follow your advise
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0