Sponsored Content
Full Discussion: moving text with sed
Top Forums Shell Programming and Scripting moving text with sed Post 302354990 by wibbles on Monday 21st of September 2009 06:55:52 AM
Old 09-21-2009
Thanks for the reply. I tried it on my server which is running Solaris 10 and get a command garbled error. Any ideas?

Code:
sed: command garbled: /rctl/,/end/{H;d};$g

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Moving part of Text in a file

Hi, I have this text in a file where I need to move part of the text.... <Relation1 OriginatingObjectID="Holding_1" RelatedObjectID="Party_1" id="Relation_1"> <OriginatingObjectType tc="4">Holding</OriginatingObjectType> <RelatedObjectType tc="6">Party</RelatedObjectType>... (4 Replies)
Discussion started by: mgirinath
4 Replies

2. Shell Programming and Scripting

sh: Inserting tabs and moving text to 1 line

I trying to extract certain text from a csv file and then placing it into another csv file, but having problems getting the data to placed in one line with tab separated fields. Basically would like to have text sent to interfaces.csv in one line seperated by tabs. As it currently places files... (6 Replies)
Discussion started by: 00000008
6 Replies

3. Shell Programming and Scripting

deleting particular lines and moving a line up using perl/sed

Hi, I need convert a dump file in the following format : (please note that line numbers are provided for easy look) Original file: 1 2007-10-2482.90 No trade 0 0.00 100000.00 2 100000.00 3 0.00 4 HOLD 5 2007-10-2589.75 Bought 1114 1114 100000.00 0.00 ... (5 Replies)
Discussion started by: sabyasm
5 Replies

4. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

Hi all, I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output. sed '$a\ hi... ' shell > shell1 But I face problem when using the same in script. It is throwing the error as, sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

5. Shell Programming and Scripting

Moving a part of the text in a file

*************** #some other text ***************** *************** #some other text ***************** address1=1.1.1.1 address2=2.2.2.2 address3=3.3.3.3 I have a file where i need to push all the text starting from address1 till end of file to, below . Can anyone of you... (6 Replies)
Discussion started by: srikanthgoodboy
6 Replies

6. Shell Programming and Scripting

moving text within file

I want to mvoe lines around in a file. Say I have 30 lines in a file and want to move the last 5 lines to the top of the file..how can this be done? i thought of awk and sed but was not sure context. please assist thanks (5 Replies)
Discussion started by: sigh2010
5 Replies

7. Shell Programming and Scripting

deleting text records with sed (sed paragraphs)

Hi all, First off, Thank you all for the knowledge I have gleaned from this site! Deleting Records from a text file... sed paragraphs The following code works nearly perfect, however each time it is run on the log file it adds a newline at the head of the file, run it 5 times, it'll have 5... (1 Reply)
Discussion started by: Festus Hagen
1 Replies

8. UNIX for Dummies Questions & Answers

deleting text with sed

Hi There! I've got a tab delimited text file (output from a software) to which I would like to delete specific strings from one of the columns. I have tried several sed codes, but they do not seem to work for me. I can manage to delete a specific word, but this is of no use, as I what I want to... (3 Replies)
Discussion started by: alfredman
3 Replies

9. Shell Programming and Scripting

Use sed to append text to filenames if text not already present

I have some html with hrefs that contain local links to pdf filenames. These filenames should have standardised names, i.e. there should be a label prior to the ".pdf" filename suffix. There can be many of these links on a single line of text and some may already have the label. For example ... (13 Replies)
Discussion started by: adb
13 Replies

10. Shell Programming and Scripting

Sed: how to merge two lines moving matched pattern to end of previous line

hello everyone, im new here, and also programming with awk, sed and grep commands on linux. In my text i have many lines with this config: 1 1 4 3 1 1 2 5 2 2 1 1 1 3 1 2 1 3 1 1 1 2 2 2 5 2 4 1 3 2 1 1 4 1 2 1 1 1 3 2 1 1 5 4 1 3 1 1... (3 Replies)
Discussion started by: satir
3 Replies
rctladm(1M)															       rctladm(1M)

NAME
rctladm - display or modify global state of system resource controls SYNOPSIS
rctladm [-lu] [-e action] [-d action] [name...] The rctladm command allows the examination and modification of active resource controls on the running system. An instance of a resource control is referred to as an rctl. See setrctl(2) for a description of an rctl; see resource_controls(5) for a list of the rctls supported in the current release of the Solaris operating system. Logging of rctl violations can be activated or deactivated system-wide and active rctls (and their state) can be listed. The following options are supported: -d action Disable (-d) or enable (-e) the global action on the specified rctls. If no rctl is specified, no action is taken and an -e action error status is returned. You can use the special token all with the disable option to deactivate all global actions on a resource control. You can set the syslog action to a specific degree by assigning a severity level. To do this, specify syslog=level, where level is one of the string tokens given as valid severity levels in syslog(3C). You can omit the common LOG_ prefix on the severity level. -l List available rctls with event status. This option displays the global event actions available for each rctl and the action name used with the enable (-e) and disable (-d) options. The global flag values for the control are also displayed. If one or more name operands are specified, only those rctls matching the given names is displayed. This is the default action if no options are specified. -u Configure resource controls based on the contents of /etc/rctladm.conf. Any name operands are ignored. The following operands are supported: name The name of the rctl to operate on. Multiple rctl names may be specified. If no names are specified, and the list action has been specified, then all rctls are listed. If the enable or disable action is specified, one or more rctl names must be specified. Example 1: Activating System Logging for Specific Violations The following command activates system logging of all violations of task.max-lwps. # rctladm -e syslog task.max-lwps # Example 2: Examining the Current Status of a Specific Resource The following command examines the current status of the task.max-lwps resource. $ rctladm -l task.max-lwps task.max-lwps syslog=DEBUG $ The following exit values are returned: 0 Successful completion. 1 A fatal error occurred. A message is written to standard error to indicate each resource control for which the operation failed. The operation was successful for any other resource controls specified as operands. 2 Invalid command line options were specified. /etc/rctladm.conf Each time rctladm is executed, it updates the contents of rctladm.conf with the current configuration. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ setrctl(2), getrctl(2), prctl(1), rctlblk_get_global_flags(3C), rctlblk_get_global_action(3C), attributes(5), resource_controls(5) By default, there is no global logging of rctl violations. 1 Oct 2004 rctladm(1M)
All times are GMT -4. The time now is 08:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy