The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove whitespaces between comma separated fields from file nitinbjoshi UNIX for Dummies Questions & Answers 2 06-14-2008 08:14 AM
To split a string to obtain the words delimited by whitespaces Sudhakar333 Shell Programming and Scripting 4 08-06-2007 02:26 PM
help me to remove the whitespaces between the lines ...urgent kumar1 Shell Programming and Scripting 5 10-10-2005 08:51 AM
Eliminating whitespaces during reading of a field. videsh77 Shell Programming and Scripting 4 12-13-2004 12:52 PM
trimming a file... alwayslearningunix UNIX for Dummies Questions & Answers 1 04-23-2001 02:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-25-2008
gintreach gintreach is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 7
trimming whitespaces in a file

Hello,

Im trying write a bash sript to search a file and identify any file names that contain a space at the end of them.
I was trying to use the grep command but I can find how I would identify the character I'm looking for.

Any help would be grately appreciated.
  #2 (permalink)  
Old 11-25-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,212
Code:
grep ' $'
The $ matches the end of a line, a space before the $ means a space as the last character of a line.

Regards
  #3 (permalink)  
Old 11-25-2008
gintreach gintreach is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 7
Thank you very much.
Sponsored Links
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 05:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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