sed - How to insert line before the first blank line following a token
Hello.
I have a config file (/etc/my_config_file) which may content :
I have a variable which contains the token to search :
I have a variable which contains the file to search in
I have a variable which contains the value for the searched token
I want to insert $MY_PARAMETER_VALUE, before the blank line and after the line : #media_dir = /home/some_user/my_personal_old_data
and the search token is $MY_TOKEN using some function like :
Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:
I need to search file2 for pattern in file1. If pattern found append file2 line to file3. If pattern not found append a blank line to file3.
file1 contents example:
123
456
789... (6 Replies)
I need your help,
I want to add a text every 2nd line and also a blank line after 3 line
(In the output 2nd line is "changetype: modify" and every 4th line is blank line)
Input file format
dn: abc
orclsourceobjectdn: abcd
dn: bcd
orclsourceobjectdn: bcda
dn: cba
orclsourceobjectdn:... (7 Replies)
Hi,
I want to write a sed script which from
batiato:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato:
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele: (2 Replies)
i need to compare three files in unix
a.txt b.txt c.txt
1 2 1
2 5 3
4 6 5
5 6
6
i need to insert a blank line in the file if i don't find a match
and put the items at the same column if found a match
The items in the files... (4 Replies)
Hi all,
I've googling around forum regarding my prob, the nearest would same as thread tittled Insert blank line if grep not found, but she/he did not mention the solution, so I would like to request your help
I've this task, to search in file2 based on pattern in file1 and output it to... (4 Replies)
Hello,
I am trying to write a script that will count the number of characters for each line in a file and all the lines that have less than 80 characters and that are ending with a period, I want it to insert a blank line after them immediately. But, for whatever reason the condition if ]] is... (3 Replies)
Hi,
I have a file with no blank line anywhere
Its a conf file, The lines between and starts with "#" should be sort out with the first three characters(characters are between (a-z)). and insert a blank space in between the uniq lines. For clear understanding ,pls find the below input file... (11 Replies)
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Hello.
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
minidlna.conf
MINIDLNA.CONF(5) File Formats Manual MINIDLNA.CONF(5)NAME
minidlna.conf -- MiniDLNA server configuration file
SYNOPSIS
/etc/minidlna.conf
DESCRIPTION minidlna(1) reads configuration options from the system-wide configuration file /etc/minidlna.conf, or the file specified with -f on the com-
mand line. The file contains keyword-argument pairs, one per line. Lines starting with '#' and empty lines are interpreted as comments.
The possible keywords and their meanings are as follows:
album_art_names
List of filenames to check for when searching for album art cache, separated by forward slashes ('/').
db_dir Path to the directory minidlna should use to store its database and album art cache. Uses /var/lib/minidlna by default.
enable_tivo
Set to 'yes' to enable support for streaming JPEG and mp3 files to a TiVo supporting HMO. Set to 'no' otherwise.
friendly_name
Customize the name that the minidlna server sends to clients.
inotify
Set to 'yes' to enable inotify monitoring of the files under media_dir to automatically discover new files. Set to 'no' to disable
inotify.
listening_ip
IPv4 address minidlna should listen on.
log_dir
Path to the directory where the log file should be stored. Defaults to /var/log.
log_level
Defines down to which level of importance messages should be logged. Must be one of ``off'', ``fatal'', ``error'', ``warn'', ``info''
or ``debug'', listed here in order of decreasing importance. ``off'' turns off logging messages entirely, ``fatal'' logs the most
critical messages only, and so on down to ``debug'' that logs every single messages.
media_dir
Path to the directory containing the media files the minidlna server should share. Use this option several times if you have more
than one directory to share. To restrict a path to one specific media type, you can use the following syntax: the letter 'A', 'V' or
'P', followed by a comma (',') followed by the path. The meaning of the first letter is as follows:
o 'A' for audio files;
o 'V' for video files;
o 'P' for image files.
For example, if you want to include only video files located under the /opt/media/videos directory, you would use
media_dir=V,/opt/media/videos.
After making changes to this option, you need to rebuild the database. If you use an init script to start/stop minidlna, then you
should run (as root) service minidlna force-reload. Otherwise, just add -R to your usual minidlna command line (minidlna [...] -R).
minissdpdsocket
Path to the MiniSSDPd socket, if you want to use minidlna together with MiniSSDPd. Defaults to /run/minissdpd.sock.
model_name
Set the model name reported to clients. Defaults to ``Windows Media Connect compatible (MiniDLNA)''.
model_number
Set the model number reported to clients.
network_interface
Network interface to bind to.
notify_interval
Set the notify interval, in seconds. The default is 895 seconds.
port Port for HTTP traffic. Defaults to port 80.
presentation_url
Define the presentation URL.
root_container
Use a different container as the root of the tree exposed to clients. The possible values are:
o '.' to use the standard container (this is the default);
o 'B' to use the ``Browse Directory'' container;
o 'M' to use the ``Music'' container;
o 'V' to use the ``Video'' container;
o 'P' to use the ``Pictures'' container.
If you specify 'B' and the client device is audio only, then ``Music/Folders'' will be used as the root container.
serial Set the serial number reported to clients.
strict_dlna
Set to 'yes' to strictly adhere to DLNA standards. This will allow server-side downscaling of very large JPEG images, which may hurt
JPEG serving performance on (at least) Sony DLNA products. Set to 'no' otherwise.
FILES
/etc/minidlna.conf
System-wide default configuration file.
SEE ALSO minidlna(1)Debian July 21, 2011 Debian