Help answer threads with 0 replies.
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 11-28-2011, 09:56 AM   #1
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 10:15 AM. Reason: to clarify requests
Old 11-28-2011, 12:19 PM   #2
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
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:

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


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
Combine multiple text files into one text file? dirtydog7655 Linux - Newbie 6 05-16-2013 11:47 PM
Convert DOS text files to UNIX text files ta0kira Linux - Software 7 03-15-2011 12:42 PM
[SOLVED] read a text file distrubute its contents on different text files magische_vogel Programming 13 02-26-2011 07: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 07:26 AM
Steps needed to convert multiple text files into one master text file jamtech Programming 5 10-08-2007 12:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:19 AM.

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