The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
VIM tabs... xyzt UNIX and Linux Applications 2 06-10-2008 01:27 PM
Color those tabs! iBot UNIX and Linux RSS News 0 12-10-2007 05:40 AM
removing tabs nbvcxzdz Shell Programming and Scripting 7 03-29-2005 10:49 AM
Cron Tabs rocker40 UNIX for Dummies Questions & Answers 1 12-23-2003 12:10 PM
Converting tabs in to spaces. indo1144 Shell Programming and Scripting 3 06-28-2002 05:56 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-17-2006
djkane djkane is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 27
removing certain tabs

I have a tab delimited file with many lines, one for each record.

each line is tab delimited with a tab before the first data field, a tab between each data field, and a tab after the last data field before it moves onto the next line.

I need to remove only the preceeding tab before the first data field and the tab after the last data field.

I'm sure this can be done with sed, but I don't really know the command that well.

Can anyone help?
  #2 (permalink)  
Old 08-17-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 578
Can you put some sample input data here and sample of the output you want?
  #3 (permalink)  
Old 08-17-2006
apoorvasharma80 apoorvasharma80 is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 69
Hi you can try something like this........

cat test | sed -e 's/^ //g' -e 's/ $//g' > 1


regards
Apoorva Kumar
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0