03-01-2018
sed add line to config file
what is the sed command line to add a line to a config file
config file name is "config"
line to be added
cpuid.7.edx = "----:00--:----:----:----:----:----:----"
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to add two new lines to a file.
I have:
dn: uid=beele,ou=medewerker,dc=hva,dc=nl
street: Wibautstraat 2-4
dn: uid=beelx,ou=medewerker,dc=hva,dc=nl
street: Wibautstraat 2-4
I want to make:
dn: uid=beele,ou=medewerker,dc=hva,dc=nl
changetype: modify
replace: street
street:... (3 Replies)
Discussion started by: tine
3 Replies
2. Shell Programming and Scripting
Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions,... (6 Replies)
Discussion started by: Malumake
6 Replies
3. Shell Programming and Scripting
Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below:
.....
ProxyPassReverse /foo http://foo.example.com/bar
.....
.....
RewriteRule ^/(.*) http://www.example.com/$1
RewriteRule /redirect https://www.example1.com/$1
........ (7 Replies)
Discussion started by: jy2k7ca
7 Replies
4. Shell Programming and Scripting
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies
5. Shell Programming and Scripting
Hi
In my sed version the interactive method of adding a new works :
> sed '3a\
new line ' file_name
But i want to do the same task in one command as it is a part of a script.
i hav tried the following but no luck so far
cat file_name |sed -e '3a\ new line '
cat file_name |sed -e... (4 Replies)
Discussion started by: ningy
4 Replies
6. Shell Programming and Scripting
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Discussion started by: muraliinfy04
4 Replies
7. Shell Programming and Scripting
I've been playing with sed, trying to get it to insert the contents of somefile.txt after line 13 on anotherfile.txt. I tried searching for a line with regex and attempting to insert something on the next line with:
find ./anotherfile.txt -type f -exec sed -i -e '/^dog/cat/' {} \;
but it... (2 Replies)
Discussion started by: unclecameron
2 Replies
8. Shell Programming and Scripting
Hello.
I want comment or uncomment a ligne in a config file.
The file name : /etc/samba/smb.conf
Normaly the ligne is uncomment :so the line begin with a tab character
followed by passdb backend =\tpassdb backend =
In that case I should comment this line ... (2 Replies)
Discussion started by: jcdole
2 Replies
9. Shell Programming and Scripting
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.
is there a way to speed things up?
Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
10. Shell Programming and Scripting
Hi,
I am trying to add a line to a file using sed.
tmp1:
aaaa
Hello
bbbb
Hello
I need to add "testing" after the first match of Hello. So the output should be
aaaa
Hello
testing
bbbb
Hello
and the line to be added will be a variable (2 Replies)
Discussion started by: giri_luck
2 Replies
LEARN ABOUT OPENSOLARIS
gphoto2-config
gphoto2-config(1) User Commands gphoto2-config(1)
NAME
gphoto2-config - return meta information about installed version of libgphoto2(3).
SYNOPSIS
gphoto2-config [--prefix=DIR] [--libs] [--cflags] [--help] [--version]
DESCRIPTION
gphoto2-config is a convenience script which retrieves information about the installed version of libgphoto2(3) on your system.
gphoto2-config is typically used to compile and link against libgphoto2(3). The following example shows how to use gphoto2-config in a
Makefile:
program: program.c
cc program.c `gphoto2-config --cflags --libs`
The output is similar to that produced by pkg-config(1).
OPTIONS
The following options are supported:
--cflags
Prints pre-processor and compile flags required to compile with libgphoto2(3) on the command line.
--help
Displays help and usage information.
--libs
Identical to --cflags option but only prints the link flags.
--prefix=DIR
Specify a different prefix from the default libgphoto2(3). (default is/usr).
--version
Displays version of libgphoto2(3) installed on your system.
FILES
The following files are used by this application:
/usr/bin/gphoto2-config Executable for installed library helper script
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-camera-devel |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5), pkg-config(1), libgphoto2(3)
NOTES
Written by Matt Keenan Sun Microsystems Inc., 2008.
SunOS 5.11 01 Aug 2008 gphoto2-config(1)