Computing.Net > Forums > Unix > remove spaces

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

remove spaces

Reply to Message Icon

Name: coco1239
Date: December 26, 2002 at 01:55:55 Pacific
OS: fds
CPU/Ram: fds
Comment:

hi

i want to know if there is command to remove space at the begining of line without awk

_=space

for wxample i have:
_i want to know
_i know

i want to get
i want to know
i know

please help



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: December 26, 2002 at 04:16:40 Pacific
Reply:

sed -e 's/^ *//' -e 's/ *$//' filename > outfile


0

Response Number 2
Name: Raffi
Date: December 31, 2002 at 10:53:26 Pacific
Reply:

cut -c 2- inputfile > outputfile


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: remove spaces

How to remove spaces in filenames www.computing.net/answers/unix/how-to-remove-spaces-in-filenames/8204.html

Remove last two space from last record www.computing.net/answers/unix/remove-last-two-space-from-last-record/8480.html

Removing spaces added by awk www.computing.net/answers/unix/removing-spaces-added-by-awk/8073.html