Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-16-2004, 01:26 AM   #1
LQ Newbie
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Question Deleting single space characters from a file

Hey everyone,

I am just learning Linux in school and I have a problem that I was wondering you all could solve. I need to know how to work the "tr" command to delete single space characters from a file. If I am not suppose to use the "tr" command can someone suggest another way w/o using an editor?


Old 03-16-2004, 01:58 AM   #2
Registered: Feb 2004
Posts: 489

Rep: Reputation: Disabled
After reading man tr, I came to the following command:
tr -d [:blank:] filename or something like that.
Old 03-16-2004, 03:27 AM   #3
LQ Newbie
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0

I figured it out right after I posted, it needed to be like this:

tr -d [:blank:] < filename


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
no free space on / after deleting files wishbone42 Linux - General 3 11-21-2004 01:09 PM
inserting/deleting characters into a text file ananthbv Programming 7 07-14-2004 12:40 AM
HD space not going up after deleting files MikeZila Linux - Newbie 8 07-04-2004 10:04 PM
deleting characters at the beginning of a line poobeany Programming 6 09-23-2003 06:17 PM
Deleting non ASCII characters Thinkgeekness Linux - Networking 4 03-04-2003 02:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration