Solved

change text

Posted on 2001-06-12
1
184 Views
Last Modified: 2010-04-21
I have a text file with lots of space or tabs in. Is there an easy way to remove the spaces or tabs within unix?

A.
0
Comment
Question by:aiacb
1 Comment
 
LVL 3

Accepted Solution

by:
mrn060900 earned 200 total points
Comment Utility
yes use sed

create a script using vi and enter the following

#!/usr/bin/sed
s/[  ][  ]/ /g

inbetween the [ ] put a space and a tab

save it as change
chmod 700 change

then change < oldfile > newfile

Regards Mike
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now