What about it? My code, both versions, handled that already.
It adds a newline whenever it sees the letter A-D immediately followed by a space. It also adds a newline whenever it sees A-D immediately followed by a digit.
[edit] Oh, I see, you want to exclude that B117. Hmm.
---------- Post updated at 10:32 AM ---------- Previous update was at 10:26 AM ----------
Whenever it sees A-D followed by a space, it changes that to newline A-D.
Hi Guys,
I have a file like this:
aaa b c d e f
fsss g h i k l
qqq r t h n
I want:
aaa b c d e f
fsss g h i k l
qqq r t h , n
ggg p t e d u
qqq i o s , k (2 Replies)
Hi guys,
I have txt file and I would need to extract all the contents between specific line numbers.
Line 1: apple
Line 2: orange
Line 3: mango
Line 4: grapes
Line 5: pine apple
I need to extract the content between line 2 and 4, including the contents of Line 2 and 4 so the ouput... (2 Replies)
Hi,
I need help regarding counting specific word or character per line and validate it against a specific number i.e 10. And if number of character equals the specific number then that line will be part of the output.
Specific number = 6
Specific word or char = ||
Sample data:... (1 Reply)
I'm looking for what I hope might be a one liner along these lines:
sed '/a line with more than 3 pipes in it/d'
I know how to get the pipe count in a string and store it in a variable, but I'm greedy enough to hope that it's possible via regex in the /.../d context. Am I asking too much? ... (5 Replies)
Hello guys,
I would need to remove the last character ")" of a specific line. This can be from any line. Your help is appreciated. Below is the line.
HOSTNAME=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP))
Please help. (6 Replies)
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Hi,
I'm trying to add a new line after finding a specific String.
That is my string:
volumes:
- ${DIR_WORK}/loadbalancer/html:/var/www/html
and I want to change that file to:
volumes:
- ${DIR_WORK}/loadbalancer/html:/var/www/html
extra_hosts:
-... (4 Replies)
Discussion started by: siamak
4 Replies
LEARN ABOUT CENTOS
runsvdir
runsvdir(8) System Manager's Manual runsvdir(8)NAME
runsvdir - starts and monitors a collection of runsv(8) processes
SYNOPSIS
runsvdir [-P] dir [ log ]
DESCRIPTION
dir must be a directory. log is a space holder for a readproctitle log, and must be at least seven characters long or absent.
runsvdir starts a runsv(8) process for each subdirectory, or symlink to a directory, in the services directory dir, up to a limit of 1000
subdirectories, and restarts a runsv(8) process if it terminates. runsvdir skips subdirectory names starting with dots. runsv(8) must be
in runsvdir's PATH.
At least every five seconds runsvdir checks whether the time of last modification, the inode, or the device, of the services directory dir
has changed. If so, it re-scans the service directory, and if it sees a new subdirectory, or new symlink to a directory, in dir, it starts
a new runsv(8) process; if runsvdir sees a subdirectory being removed that was previously there, it sends the corresponding runsv(8)
process a TERM signal, stops monitoring this process, and so does not restart the runsv(8) process if it exits.
If the log argument is given to runsvdir, all output to standard error is redirected to this log, which is similar to the daemontools'
readproctitle log. To see the most recent error messages, use a process-listing tool such as ps(1). runsvdir writes a dot to the read-
proctitle log every 15 minutes so that old error messages expire.
OPTIONS -P use setsid(2) to run each runsv(8) process in a new session and separate process group.
SIGNALS
If runsvdir receives a TERM signal, it exits with 0 immediately.
If runsvdir receives a HUP signal, it sends a TERM signal to each runsv(8) process it is monitoring and then exits with 111.
SEE ALSO sv(8), runsv(8), runsvchdir(8), runit(8), runit-init(8), chpst(8), svlogd(8), utmpset(8), setsid(2)
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
runsvdir(8)