LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-28-2011, 08:56 AM   #1
thepowerofone
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Rep: Reputation: Disabled
Left justify att text in my 11 text files at once


How do I left justify the text in my 11 .text files at once without doing them individually. Would I need to use sed to do this as I am not to sure of sed.

Many thanks.

Last edited by thepowerofone; 11-28-2011 at 09:15 AM. Reason: to clarify requests
 
Old 11-28-2011, 11:19 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I don't know what you mean by "left justify the text in a text file", but assuming that there are spaces to the left of each line and you want them gone, try this:

Code:
sed 's/^[ \t]*//'
 
  


Reply



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
Combine multiple text files into one text file? dirtydog7655 Linux - Newbie 6 05-16-2013 10:47 PM
Convert DOS text files to UNIX text files ta0kira Linux - Software 7 03-15-2011 11:42 AM
[SOLVED] read a text file distrubute its contents on different text files magische_vogel Programming 13 02-26-2011 06:51 PM
join 2 text files based on first number present in every line of the 2 text files markraem Linux - Software 4 01-25-2010 06:26 AM
Steps needed to convert multiple text files into one master text file jamtech Programming 5 10-07-2007 11:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 AM.

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