Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
I'm drawing a blank on how to use sed to replace selectively based on position in the string (vs nth occurence):
hello.|there.|how.|are.|you.|
I want the period removed in the 3rd item (as defined by the pipe delimiter) if a period is present. So the result in this case would be:
... (2 Replies)
I asked this before, but my problem got more complicated. Heres what I am trying to do:
I'm trying to replace a string at a certain location with another string.
Heres the file I'm trying to change:
\E
I want to replace the escape code at the 3rd line, 2nd column with this escape code... (3 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Trying to combine strings that are a partial match to another in $1 (usually below it). If a match is found than the $2 value is added to the $2 value of the match and the $3 value is added to the $3 value of the match. I am not sure how to do this and need some expert help. Thank you :).
file
... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
hobbitlaunch
HOBBITLAUNCH(8) System Manager's Manual HOBBITLAUNCH(8)NAME
hobbitlaunch - Master program to launch other Xymon programs
SYNOPSIS
hobbitlaunch [options]
DESCRIPTION hobbitlaunch(8) is the main program that controls the execution and scheduling of all of the components in the Xymon system.
hobbitlaunch allows the administrator to add, remove or change the set of Xymon applications and extensions without restarting Xymon - hob-
bitlaunch will automatically notice any changes in the set of tasks, and change the scheduling of activities accordingly.
hobbitlaunch also allows the administrator to setup specific logfiles for each component of the Xymon system, instead of getting output
from all components logged to a single file.
OPTIONS --env=FILENAME
Loads the environment from FILENAME before starting other tools. The environment defined by FILENAME is the default, it can be
overridden by the ENVFILE option in hobbitlaunch.cfg(5)--config=FILENAME
This option defines the file that hobbitlaunch scans for tasks it must launch. A description of this file is in hobbitlaunch.cfg(5)
The default tasklist is /etc/hobbitlaunch.cfg
--log=FILENAME
Defines the logfile where hobbitlaunch logs information about failures to launch tasks and other data about the operation of hobbit-
launch. Logs from individual tasks are defined in the hobbitlaunch.cfg file. By default this is logged to stdout.
--pidfile=FILENAME
Filename which hobbitlaunch saves its own process-ID to. Commonly used by automated start/stop scripts.
--verbose
Logs the launch of all tasks to the logfile. Note that the logfile may become quite large if you enable this.
--dump Just dump the contents of the hobbitlaunch.cfg file after parsing it. Used for debugging.
--debug
Enable debugging output while running.
--no-daemon
hobbitlaunch normally detaches from the controlling tty and runs as a background task. This option keeps it running in the fore-
ground.
STARTING TASKS
hobbitlaunch will read the configuration file and start all of the tasks listed there.
If a task completes abnormally (i.e. terminated by a signal or with a non-zero exit status), then hobbitlaunch will attempt to restart it 5
times. If it still will not run, then the task is disabled for 10 minutes. This will be logged to the hobbitlaunch logfile.
If the configuration file changes, hobbitlaunch will re-read it and notice any changes. If a running task was removed from the configura-
tion, then the task is stopped. If a new task was added, it will be started. If the command used for a task changed, or it was given a new
environment definition file, or the logfile was changed, then the task is stopped and restarted with the new definition.
SEE ALSO hobbitlaunch.cfg(5), xymon(7)Xymon Version 4.2.3: 4 Feb 2009 HOBBITLAUNCH(8)