Sponsored Content
Top Forums Shell Programming and Scripting Sed to handle newline specific name modifiication Post 302326895 by vasanth_vadalur on Friday 19th of June 2009 06:06:44 AM
Old 06-19-2009
sed need to see the next line and with specific TAB

Hi,

The above input and output file data does not showing the initial TAB space characters.

3 TAB space is present in the front of C1 and C2 function objects.



Note:

First the program need to search c2 then in the next line, after three tab space "width" word should be replaced with "width2". Then in the next line, after three tab space, the "height" word should be replaced as "height2".

The other function width and height should not be changed.

Thanks in Advance,
Vasanth
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to handle variables in sed

while read line do str1=`grep 'customernumberR11' file1 | cut -c 20-21` str2=`grep 'newnumberR11' file1 | cut -c 15-16` if ; then sed -e "s/newnumberR11/ s/$str2/\$str1/g" $line fi done < file1 (4 Replies)
Discussion started by: LAKSHMI NARAYAN
4 Replies

2. Shell Programming and Scripting

Sed to handle newline specific name modifiication

Hi, The below link clarification required... https://www.unix.com/shell-programming-scripting/112523-sed-handle-newline-specific-name-modifiication.html Vasanth (1 Reply)
Discussion started by: vasanth_vadalur
1 Replies

3. Shell Programming and Scripting

add newline in file after finding specific text

Hi All, I am tring to insert a newline with "/" in a text file whenever there is the text "end;" right now I have inside file: . . end; I want to have: . . end; / I tried doing the following within the file :g/^end;/s//end; \/ / (4 Replies)
Discussion started by: jxh461
4 Replies

4. Shell Programming and Scripting

using awk removing newline and specific position

Hello Friends, Input File looks as follows: >FASTA Header1 line1 line2 line3 linen >FASTA Header2 Line1 Line2 linen >FASTA Header3 and so on ....... Output: Want something as: >FASTA Header1 line1line2line3linen >FASTA Header2 (5 Replies)
Discussion started by: Deep9000
5 Replies

5. Shell Programming and Scripting

sed newline to tab ,problem

Input: gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly sed 's/\n/\t/g' infile It's not working. Output should be: gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly (5 Replies)
Discussion started by: cola
5 Replies

6. Shell Programming and Scripting

sed newline

Hi everyone, I'd like to use the script validatehtml which returns either the given url is HTML strict or not, using http:// validator . w3 . org . sh validatehtml #!/bin/bash wget -q http:// validator . w3 .org / check?uri=$1 cat check\?uri\=$1 | sed -n '/h2/ p' | sed 's/ */ /g' | sed... (2 Replies)
Discussion started by: azertyazerty
2 Replies

7. Shell Programming and Scripting

AWK/SED: handle max chars in a line

Hi all, I hope you guys can help me. I prefer SED/AWK solutions if possible. For my shame it didn't work for me :o ISSUE: :wall: 1\3 1/$4\@7\ 1234567890123456789\ 1234567890123456789,\ 1234567890123456789\ 123456789012 12345 1234567890123456789\ 1234567890123456789,\ 1234... (5 Replies)
Discussion started by: unknown7
5 Replies

8. Shell Programming and Scripting

Why SED can't see the last newline character?

Removed. My question does not make sense. and SED does see the last newline character. But I still have a question: How to remove the last newline character(the newline character at the end of last line) using SED? ---------- Post updated 05-01-11 at 10:51 AM ---------- Previous update was... (7 Replies)
Discussion started by: kevintse
7 Replies

9. Shell Programming and Scripting

How to replace NewLine with comma using sed?

Hi , I have a huge file with following records and I want to replace the last comma with ',NULL'. I try using SED but could not create a correct script . In my opinion I need a script which can convert ,/n with ,NULL/n 1,CHANGE_MEMBER,2010-12-28 00:05:00, 2,CHANGE_MEMBER,2012-09-02... (8 Replies)
Discussion started by: Ajaypal
8 Replies

10. Shell Programming and Scripting

Insert a newline after match in files of specific name under some subdirectories?

Hi I'd like to add the newline: \tuser: nobody", or "<TAB>user: nobody to all files named: docker-compose.ymlin subfolders of pwd with names beginning with 10-20. Within these files, I'd like to find the line (there'll only be one) containing: command: celery workerNOTE: As far as... (2 Replies)
Discussion started by: duncanbetts
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 x y Returns the name of the element at position x, y. See ttk::widget(n). 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 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy