removing tabs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting removing tabs
# 8  
Old 03-29-2005
Quote:
Originally Posted by esham
Hi Tanku..

Can u explain the usage


dont know the swiches -e:a -e
then ta
P;D

please help

thanks in advance
esham
i stole it from handy one-liners for sed. the problem was similar to the example of a line that begins with an equal sign (sed -e :a -e '$!N;s/\n=/ /;ta' -e 'P;D')

-e cmd
Next argument is an editing command. Useful if multiple scripts or commands are specified.

:label
Label branched to by t or b.
b
Branch to label or to end of script.
t
Same as b, but branch only after substitution.

P
Print first part (up to embedded newline) of multiline pattern space created by N command. Same as p if N has not been applied to a line.

D
Delete the first part (up to embedded newline) of multi-line pattern space created by N command and resume editing with first command in script. If this command empties the pattern space, a new line of input is read, as if the d command had been executed.

of course you can also read the friendly manual
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies

2. Shell Programming and Scripting

Removing hidden tabs

I want to know how can I remove all the tabs (\t) from a tab delimited file. In my file some of the rows only contain one column and rest are unoccupied but the tabs are there. When I performed some regular expressions to do substitutions like: %s/\t/\/\/ /ig all the hidden tabs are converted... (4 Replies)
Discussion started by: Lucky Ali
4 Replies

3. UNIX for Dummies Questions & Answers

vertical tabs

I am trying to get this to display vertically like in a table but it keeps jumping to a new line dev=$(df -h | grep ^/dev | cut -d " " -f1) dev1=$(df -h | grep ^/dev | cut -f 2 -d "%") dev2=$(df -h | grep ^/dev | cut -f 14-16 -d " ") dev3=$(df -h | grep ^/dev | cut -f 18-20 -d " ")... (1 Reply)
Discussion started by: gjanisse
1 Replies

4. Linux

Kconsole and tabs

Hi Guys i current use Kcosole i have this liitle code that changes the tilte to the current directory that i am in # Set the terminal title to pwd case $TERM in xterm*) precmd() {print -Pn "\e]0;%~ \a"} ;; esac in Kconsole you can have... (0 Replies)
Discussion started by: ab52
0 Replies

5. Shell Programming and Scripting

too many tabs

Hi, I have a file that has too many tabs between columns. I cannot get the tabs out. Basically the tab between column 1 and 2 are fine but between 2/3, 3/4 etc are like 5 tabs. How do I get rid of these 5 tabs so its just 1 tab. thanks (3 Replies)
Discussion started by: phil_heath
3 Replies

6. UNIX and Linux Applications

GVIM with tabs

Hi People, Does gvim latest versions support tabs. I would like to open different files in tabs rather than new windows or split windows. I would like to whether the current version supports it, if it doesn't then how to add such feature. Thanks, :) (2 Replies)
Discussion started by: rimser9
2 Replies

7. Shell Programming and Scripting

spaces or Tabs?

When formatting a script let's say for instance the following: case ${choice} in 1) vi ${tmp1}.tmp # overwrite the tmp1 var with any user changes cp ${tmp1}.tmp ${tmp1} ;; ... (2 Replies)
Discussion started by: llsmr777
2 Replies

8. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: djkane
2 Replies

9. UNIX for Dummies Questions & Answers

Cron Tabs

I am on AIX 5.1 If I have a crontab that looks like this 01 1 * * 6 What does the 6 mean ? if the * means that everyday it should run then why would the 6th day be signified ? Shouldn't it be a * also? Thanks (1 Reply)
Discussion started by: rocker40
1 Replies
Login or Register to Ask a Question
XmTabListReplacePositions(library call) 								   XmTabListReplacePositions(library call)

NAME
XmTabListReplacePositions -- A convenience function that creates a new tab list with replacement tabs SYNOPSIS
#include <Xm/Xm.h> XmTabList XmTabListReplacePositions( XmTabList oldlist, Cardinal *position_list, XmTab *tabs, Cardinal tab_count); DESCRIPTION
XmTabListReplacePositions creates a new tab list that contains the contents of oldlist, but with the tabs at the positions in position_list replaced with copies of the corresponding tabs in tabs. A warning message is displayed if a specified position is invalid; for example, if the value is a number greater than the number of tabs in the tab list. This function deallocates the original tab list after extracting the required information. It is the caller's responsibility to free the tabs in tabs by using the XmTabFree function. oldlist Specifies the tab list. The function deallocates the tab list after extracting the required information. position_list Specifies an array of positions of the tabs to be replaced. The position of the first tab is 0 (zero), the position of the second tab is 1, and so on. tabs Specifies an array of the replacement tabs. tab_count Specifies the number of elements in position_list and tabs. RETURN
If tabs, oldlist, or position_list is NULL, or tab_count is 0 (zero), returns oldlist. Otherwise, this function returns the new tab list. The function allocates space to hold the returned tab list. The application is responsible for managing the allocated space. The applica- tion can recover the allocated space by calling XmTabListFree. RELATED
XmTabList(3). XmTabListReplacePositions(library call)