Sponsored Content
Top Forums Shell Programming and Scripting use SED to replace repeat statements Post 302360280 by watsup on Thursday 8th of October 2009 01:19:53 PM
Old 10-08-2009
Thanks Tyler..Got it
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Loop with sed command to replace line with sed command in it

Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line. ... (1 Reply)
Discussion started by: cbo0485
1 Replies

2. UNIX for Dummies Questions & Answers

SED: Can't Repeat Search Character in SED Output

I'm not sure if the problem I'm seeing is an artifact of sed or simply a beginner's mistake. Here's the problem: I want to add a zero-width space following each underscore between XML tags. For example, if I had the following xml: <MY_BIG_TAG>This_is_a_test</MY_BIG_TAG> It should look like... (8 Replies)
Discussion started by: rhetoric101
8 Replies

3. Shell Programming and Scripting

using sed to replace help

Hi, i am following content in file cat file Install Installation-path variable Now i need to replace Installation-path with some text to be provided as argument in csh script invocation My question is , can i replace this by only using path eg. sed "s/path/$1" file but it... (1 Reply)
Discussion started by: sarbjit
1 Replies

4. Shell Programming and Scripting

help with sed or replace

Hi, I have to replace the values in a file with the values from my variables. For e.g file contains Prev_date=’01-01-1999’ Curr_date= ’02-11-2010’ I need to replace the value of this prev_date and curr_date with the value of the variables I create namely Last_day=02-10-2010... (3 Replies)
Discussion started by: dsravan
3 Replies

5. Shell Programming and Scripting

How to use sed to replace the a string in the same file using sed?

How do i replace a string using sed into the same file without creating a intermediate file? (7 Replies)
Discussion started by: gomes1333
7 Replies

6. Shell Programming and Scripting

combining multiple sed statements

I need to run a cronjob that will monitor a directory for files with a certain extension, when one appears I then need to run the below scripts How do I go about combining the following sed statements into one script? and also retain the original filename.? sed 's/71502FSC1206/\n&/g' # add a... (2 Replies)
Discussion started by: firefox2k2
2 Replies

7. Shell Programming and Scripting

Parse through ~21,000 Database DDL statements -- Fastest way to perform search, replace and insert

Hello All: We are looking to search through 2000 files with around 21,000 statements where we have to search, replace and insert a pattern based on the following: 1) Parse through the file and check for CREATE MULTISET TABLE or CREATE SET TABLE statements.....and they always end with ON... (5 Replies)
Discussion started by: madhunk
5 Replies

8. Shell Programming and Scripting

Sed/replace help

How can we empty or replace with null, following block of code (within the php quotes including the quotes) from inside a file. *** some other data above this code <? #317008# ... (5 Replies)
Discussion started by: fed.linuxgossip
5 Replies

9. Shell Programming and Scripting

Help with replace comma with new line and repeat the content

Input file G A G A,T A C A G,T,C T C . . Desired Output file G A G A G T A C A G A T A C T C (4 Replies)
Discussion started by: perl_beginner
4 Replies

10. Shell Programming and Scripting

awk sed to repeat every character on same position from the upper line replacing whitespace

Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position? I am asking this because the file I have doesn't always follow a pattern. For example the file I have is the result of a command to obtain windows ACLs: icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
RGBPAINT(1)						   Mark Tyler's painting program					       RGBPAINT(1)

NAME
rgbpaint - A simple pixel-based painting program. SYNOPSIS
rgbpaint [options] [image-file] [-stamps file ...] DESCRIPTION
rgbPaint is a very basic painting program created by forking mtPaint at version 3.09, and then simplifying the user interface. It relies on a small but modifiable palette for pixel-based image editing. Images can be saved in ICO, JPEG and PNG formats; files in other image formats can be loaded, but not saved in the original format. OPTIONS
The program accepts the following options: --help Print usage information. -d dir Use dir as the default directory for loading and saving image files. -s Grab a screen shot during launch. -stamps Any file names remaining on the command line will be loaded as stamps. -svg dir Load program icons in SVG format from the directory dir. -thumb size Set size in pixels that stamp thumbnails should be scaled to (up or down depending on original size). The default is 40 pixels on a side; permitted values are in the range 32-256. -u limit Set the maximum size of the undo buffer to limit MB. The default is 32 MB; permitted values are in the range 1-500. --version Print version information. APPEARANCE
When launched, rgbpaint will use most of its available window area to present a view of a large Canvas. At the top there will be a Tasks panel, and a Brushes/Colours panel will be at the left edge. It is also possible for a rather narrow Stamps panel containing iconised images to be inset at the bottom edge. THE TASKS PANEL
This panel is used for selecting actions, each of which is also accessible via a keyboard shortcut. The available actions can be classified into the following groups: o New image, Load image file, Save image file, Save image file as o Paint, Flood fill, Make selection o Cut, Copy, Paste, Paste text o Undo, Redo, Transform colour, Pan window, Scaling The first group deals with creating new blank images and reading from or writing to image files. Each action conducts its own safety check in order not to lose unsaved data. It is worth remembering that a fresh canvas is white, and that it is surrounded by greyish borders if the canvas is smaller than the available window area. A simple dialogue is also launched for selecting the size of any new, blank image. The second group picks the main mode that rgbpaint should enter. When it is in Paint mode, the cursor will become a pencil symbol, while Fill mode displays as a bucket being emptied. Selection mode is more complicated, using more than one icon - see the section ``MAKING AND USING SELECTIONS''. The third group covers actions that operate on a selected portion of the canvas: Cutting out a shape from the canvas, making a Copy in memory of the content within the marked area, Pasting the copy back from memory onto the canvas, or opening a dialogue window for Text, which will deploy a new selection area just large enough to hold the snippet of text specified using the dialogue window. The final group lists miscellaneous actions: Undo an editing step, Redo an undone step, Transform the overall colour settings, Pan the window across the canvas (a miniature window is shown with a pane whose movements are controlled by the arrow keys), or finally, set the Scaling of the canvas. Some of the icons have the property of becoming dimmed if the action is not accessible at a particular moment, indicating that rgbpaint is in an inapproriate mode, that no editing steps can be undone/redone, or that no in-memory content exists. MAKING AND USING SELECTIONS
The Selection main mode is intended for grabbing and manipulating portions of the full canvas. It can itself be thought of as being divided into three further states: Resting is indicated by a cross-hairs icon and happens when no corner marker has been set. Marking shows one out of four corner icons. They all indicate how the next point selected will be used to lay down a rectangle together with the previously set corner. To get a feeling for this, it is best to experiment a little by moving the pointer around. A corner is set by left clicking, and two set corners show up as a rectangle outlined by dashed lines. A right click will cancel all corners, and will return to the resting state. Moving means that the pointer is hovering above a selected area, and that this area may be moved around. The icon consists of two crossed double-ended arrows, but can look similar to a diamond shape with four small, internal squares. The selected area can be moved around using the keyboard shortcuts (see the section ``KEYBOARD SHORTCUTS''), or by holding the left mouse button down and moving the pointer around. THE BRUSHES
/COLOURS PANEL Here the user chooses a brush and colour for painting, or colour only for flood filling. The upper part of the panel holds the ten different brushes, six solid and four thin ones. The solid brushes can give a square or a round outline in any of three thicknesses. Out of the four available thin brushes, the smallest is so thin as to paint one pixel at a time, making possible very accurate brush work. The other three are of larger sizes, but they all colour pixels in a random fashion within their outline, so they act somewhat like staining a surface. In the lower part of the panel there are twenty buttons displaying a palette of available colours. Clicking on any of these chooses the corresponding colour for painting, until it is replaced. An elongated button, between the upper and the lower areas, will always display the active colour, and has a further useful function. Clicking the left mouse button on it will summon a colour editor. This allows the user to blend a new colour, which will, once accepted, replace the colour that was previously active. THE STAMPS PANEL
This extra panel, at the bottom of the program window, comes to life only if rgbpaint was launched using the command line switch -stamps, followed by the names of existing image files. The displayed size of any thumbnail image is determined by the switch -thumb, or set to 40 pixels in both width and height. If the user left-clicks on a thumbnail image, a copy of the image will appear in the middle of the canvas, with the size of the original image, not that of the thumbnail. The copy is in fact only a marked area (see the section ``MAKING AND USING SELECTIONS''), and can be moved around at will with the left mouse button, until a final right click will deposit a copy on the canvas. The marked area is still sitting on top, so it may again be moved around to make additional imprints. COPYING, CUTTING, AND PASTING rgbPaint handles cut-and-paste a little differently from most similar applications. To make it easier to avoid mistakes, here is a description of how to manipulate chunks of the canvas. When a rectangular portion of the canvas has been selected, it is possible to perform the action Copy. It will take the content of the marked area and save it in-memory for later access. When doing a Cut, the marked area is emptied of its content, so it will appear as a black rectangle, but the removed portion will be remembered as in-memory content which remains available for pasting back. Observe that copying and cutting can only be performed in Selection mode, since a selected area must exist for either action to be sensible. On the other hand, the act of Pasting is possible in Paint mode as well as in Fill mode. When the pasting action is triggered (by icon or by key stroke) the in-memory content is dropped onto the window and it will lie centred on the canvas. It will not yet be painted on the canvas, as it is only casting a shadow to display its contents, but it is ready to move into position before being imprinted on the canvas. The movement itself was described in the section ``MAKING AND USING SELECTIONS'' KEYBOARD SHORTCUTS
Some handy keyboard shortcuts are available. The keys 1-9 change image scaling in pre-determined steps. The keys + and - give a fine-grained scaling up or down. Any Arrow key moves the mouse pointer in small steps across the canvas; steps which can be made larger by pressing Shift-Arrow. When instead using Ctrl-Arrow, the whole canvas will shift in the implied direction. Actions 1-9 Change scaling to fixed levels. +, - Scale up, scale down. Ins Summon the Transform colour dialogue. End Summon the Pan Window dialogue. f Select Flood fill mode. p Select Paint mode. q Quit the program. s Activate Make Selection mode. t Summon the Text paste dialogue. Ctrl-C Make an in-memory Copy of the marked area. Ctrl-N Prepare a New image, including a sizing dialogue. Ctrl-O Open a file dialogue for fetching an image. Ctrl-P Paste the in-memory copy onto a marked area of the canvas. Ctrl-S Save the image in a file, using the old name. Ctrl-Shift-S Save the image in a file, choosing a new name. Ctrl-X Cut the selected portion out of the canvas (keeping an in-memory copy). Ctrl-Y Redo the most recently undone action. Ctrl-Z Undo the most recently completed action. Movement Arrow Move pointer slightly. Shift-Arrow Move pointer in larger steps. Ctrl-Arrow Move canvas rather than pointer. Home Go to the top of the canvas. Ctrl-Home Go to the far left of the canvas. PgUp, PgDn Move the canvas up or down, one page at a time. Ctrl-PgUp, Ctrl-PgDn Move the canvas left or right, one page at a time. CUSTOMISED TASK ICONS
There is a built-in facility for customising the appearance of the task icons as they appear in the Tasks panel. This is mostly an issue for the administrators of kiosk systems or similar, not for the casual user. It can also make sense to use this in the command string registered for rgbpaint within the Debian menu subsystem, on machines where menu access is the only way users are expected to launch the program. See next section for the details. FILES
At launch time, rgbpaint will record the current working directory as the default location for fetching and storing image files. This is the directory suggested every time a file dialogue is brought into action. Using the command line option -d, it is possible to set another location. A reasonable choice is "-d ~" for accessing the home directory of the user. The command line switch -svg allows a directory to be specified where rgbpaint should look for particular vector image files in SVG format. Their names must all be of the form "stock-XXX.svg", where the XXX is one of the following key words: new, open, save, saveas, cut, copy, paste, undo, redo, text, paint, fill, select, sun, or zoom. Each will provide an icon for the corresponding function in the top panel. A missing icon will be replaced by a default choice, but there is no guarantee that the fallback icon will be unique, or be relevant for the intended purpose. HOMEPAGE
http://mtpaint.sourceforge.net/rgbpaint.html SEE ALSO
mtpaint(1), rgbPaint's more featureful relative. PROGRAM AUTHORS
Mark Tyler, Dmitry Groshev MANUAL AUTHORS
The original manual page stub was taken as starting point for a complete rewrite as Docbook source, and was substantially extended by Mats Erik Andersson and Justin B Rye. The new format was chosen in order to simplify translations, and was originally intended for use by the Debian project, but the text may be used by others. Permission is granted to copy, distribute and/or modify this document under the same terms as rgbPaint itself. COPYRIGHT
Copyright (C) 2010 Mats Erik Andersson rgbPaint 0.8.7 December 17th, 2010 RGBPAINT(1)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy