Sponsored Content
Top Forums Shell Programming and Scripting sed removing extra character from end Post 302939147 by Franklin52 on Monday 23rd of March 2015 07:20:54 AM
Old 03-23-2015
Another approach:
Code:
sed 's/[ \t]*$//' a.txt

Or us CTRL-V <TAB> for \t
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing character from list line (at the end)

Hi, I have file as shown below. abc, def, abc, xyz, I have to remove ',' from end of last line (xyz,). How can I do that with single command? Is it possible or I have to iterate through complete file to remove that? - Malay (2 Replies)
Discussion started by: malaymaru
2 Replies

2. UNIX for Dummies Questions & Answers

removing a character and addending to end in each line in a file

HI i am having a file this (sys19:pnlfct:/pfact/temp>) cat temp_sand 1234567890 1234567890 1234567890 1234567890 I want to make this file as (sys19:pnlfct:/pfact/temp>) cat temp_sand 1456789023 1456789023 1456789023 1456789023 just take the 2nd and 3rd position and put it... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

3. Shell Programming and Scripting

Removing '." character using SED

HI All, Have some files which contains some string like, "create .<table1> as" "insert into .<table2> values", i want to replace ".<table1>" with only "<table1>", i.e removing '.' character in ksh, i have written below code but it is not removing the dot character, any help? for name... (2 Replies)
Discussion started by: arvindcgi
2 Replies

4. Shell Programming and Scripting

How to get rid of extra enter at the end???

Hi guys, I want to automate a few tasks. For one of them, I need to get the output of a command and parse it to extract information I need: drbdadm create-md drbd0 The output is: md_offset 48010952704 al_offset 48010919936 bm_offset 48009453568 Found ext2 filesystem which uses... (2 Replies)
Discussion started by: alirezan
2 Replies

5. Shell Programming and Scripting

Removing a character using sed

Hi, I have a file with the text below. How do i remove the character "%" from the text file using sed ? Can anybody help ? 0% 68% 72% 0% 54% 33% 75% 24% 6% 59% 77% 77% 33% (6 Replies)
Discussion started by: Raynon
6 Replies

6. UNIX for Dummies Questions & Answers

Removing ^@ character at the end own belowof Linux file

Hi, I have a Linux file which has content as sh (0 Replies)
Discussion started by: bhuvanas
0 Replies

7. UNIX for Dummies Questions & Answers

Removing end of line using SED

Hello Friends, How can I remove the last two values of this line using sed John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900 The result should look like this: John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies

8. Shell Programming and Scripting

sed removing until end of line

All: Can somebody help me out with a sed command, which removes the the first occurance of ')' until the end of the line If I have the following input ... (5 Replies)
Discussion started by: BeefStu
5 Replies

9. Shell Programming and Scripting

sed - Removing all characters from token to end of line

Hello. The token is any printable characters between 2 " . The token is unknown, but we know that it is between 2 " Tok 1 : "1234x567" Tok 2 : "A3b6+None" Tok 3 : "A3b6!1234=@" The ligne is : Line 1 : "9876xABCDE"Do you have any code fragments or data samples in your post Line 2 : ... (3 Replies)
Discussion started by: jcdole
3 Replies

10. Shell Programming and Scripting

awk - Removing extra character when setting variable

I have a data file d0 that looks like this: $cat d0 server1 running -n-cv- 8G 3.1% 1435d 15h server2 running -n---- 8G 39% 660d 22h server3 running -n--v- 8G 2.5% 1173d 6h server4 running -n---- 8G 1.1% 1048d 20h... (2 Replies)
Discussion started by: jake0391S
2 Replies
ttk::notebook(n)						 Tk Themed Widget						  ttk::notebook(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::notebook - Multi-paned container widget SYNOPSIS
ttk::notebook pathname ?options...? pathname add window ?options...? pathname insert index window ?options...? _________________________________________________________________ DESCRIPTION
A ttk::notebook widget manages a collection of windows and displays a single one at a time. Each slave window is associated with a tab, which the user may select to change the currently-displayed window. STANDARD OPTIONS
-class -cursor -takefocus -style See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-height height] If present and greater than zero, specifies the desired height of the pane area (not including internal padding or tabs). Otherwise, the maximum height of all panes is used. [-padding padding] Specifies the amount of extra space to add around the outside of the notebook. The padding is a list of up to four length specifications left top right bottom. If fewer than four elements are specified, bottom defaults to top, right defaults to left, and top defaults to left. [-width width] If present and greater than zero, specifies the desired width of the pane area (not including internal padding). Otherwise, the maximum width of all panes is used. TAB OPTIONS
The following options may be specified for individual notebook panes: [-state state] Either normal, disabled or hidden. If disabled, then the tab is not selectable. If hidden, then the tab is not shown. [-sticky sticky] Specifies how the slave window is positioned within the pane area. Value is a string containing zero or more of the characters n, s, e, or w. Each letter refers to a side (north, south, east, or west) that the slave window will "stick" to, as per the grid geometry manager. [-padding padding] Specifies the amount of extra space to add between the notebook and this pane. Syntax is the same as for the widget -padding option. [-text text] Specifies a string to be displayed in the tab. [-image image] Specifies an image to display in the tab. See ttk_widget(n) for details. [-compound compound] Spec- ifies how to display the image relative to the text, in the case both -text and -image are present. See label(n) for legal values. [-underline underline] Specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation if ttk::notebook::enableTraversal is called. TAB IDENTIFIERS
The tabid argument to the following commands may take any of the following forms: o An integer between zero and the number of tabs; o The name of a slave window; o A positional specification of the form "@x,y", which identifies the tab o The literal string "current", which identifies the currently-selected tab; or: o The literal string "end", which returns the number of tabs (only valid for "pathname index"). WIDGET COMMAND
pathname add window ?options...? Adds a new tab to the notebook. See TAB OPTIONS for the list of available options. If window is currently managed by the notebook but hidden, it is restored to its previous position. pathname configure ?options? See ttk::widget(n). pathname cget option See ttk::widget(n). pathname forget tabid Removes the tab specified by tabid, unmaps and unmanages the associated window. pathname hide tabid Hides the tab specified by tabid. The tab will not be displayed, but the associated window remains managed by the notebook and its configuration remembered. Hidden tabs may be restored with the add command. pathname identify component x y Returns the name of the element under the point given by x and y, or the empty string if no component is present at that location. The following subcommands are supported: pathname identify element x y Returns the name of the element at the specified location. pathname identify tab x y Returns the index of the tab at the specified location. pathname index tabid Returns the numeric index of the tab specified by tabid, or the total number of tabs if tabid is the string "end". pathname insert pos subwindow options... Inserts a pane at the specified position. pos is either the string end, an integer index, or the name of a managed subwindow. If subwindow is already managed by the notebook, moves it to the specified position. See TAB OPTIONS for the list of available options. pathname instate statespec ?script...? See ttk::widget(n). pathname select ?tabid? Selects the specified tab. The associated slave window will be displayed, and the previously-selected window (if different) is unmapped. If tabid is omitted, returns the widget name of the currently selected pane. pathname state ?statespec? See ttk::widget(n). pathname tab tabid ?-option ?value ... Query or modify the options of the specific tab. If no -option is specified, returns a dictionary of the tab option values. If one -option is specified, returns the value of that option. Otherwise, sets the -options to the corresponding values. See TAB OPTIONS for the available options. pathname tabs Returns the list of windows managed by the notebook. KEYBOARD TRAVERSAL
To enable keyboard traversal for a toplevel window containing a notebook widget $nb, call: ttk::notebook::enableTraversal $nb This will extend the bindings for the toplevel window containing the notebook as follows: o Control-Tab selects the tab following the currently selected one. o Shift-Control-Tab selects the tab preceding the currently selected one. o Alt-K, where K is the mnemonic (underlined) character of any tab, will select that tab. Multiple notebooks in a single toplevel may be enabled for traversal, including nested notebooks. However, notebook traversal only works properly if all panes are direct children of the notebook. VIRTUAL EVENTS
The notebook widget generates a <<NotebookTabChanged>> virtual event after a new tab is selected. EXAMPLE
pack [ttk::notebook .nb] ttk::notebook::enableTraversal .nb SEE ALSO
ttk::widget(n), grid(n) KEYWORDS
pane, tab Tk 8.5 ttk::notebook(n)
All times are GMT -4. The time now is 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy