Replace line in file with line in another file based on matching string
HI
Can any one guide me how to achieve this task. I have 2 files
In the above configuration.properties file i need to replace the line "identity_server_url" with env.txt file content. In configuration.properites file before '=' values are constant. After '=' values are changing. So i need to replace the line with matched string before '=' in configuration.properties with env.txt
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Hi,
I want to replace the srting '; with ABCD'; in a file from line 1 to line 65. Is there any single command to do it without using awk
Thanks for quick reply
https://www.unix.com/images/misc/progress.gif (3 Replies)
Hello all, the title makes this sound simple, and maybe it should be.
This is by code:
#!/bin/sh
cp ch25.txt ch25.fn.tex
n=`grep -c '^\' ch25_footnotes.txt > temp`
r=`awk -F] '{print $2}' temp`
`sed 's/\/\\footnote{$r}/' ch25.fn.tex`
done
This is what I am trying to... (6 Replies)
I have a file which contains several lines. Sample content of the file is as below.
OK testmessage email<test@123>
NOK receivemessage email<123@test>
NOK receivemessage email(123@test123)
NOK receivemessage email<abc@test>
i would like to know by scripting will... (10 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi
I am not the best scripter in the world and have run into a issue which you might be able to guide me on...
I have two files.
File1 :
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
File2:
C345,... (5 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
I don't know if it's been asked before but seems i gave up seeking.
i have 2 files :
file1.txt
Monday XXXX
Tuesday XXXX
XXXX Wednesday
Thursday XXXX
XXXX is in every lines of file1.txt and i want to replace them with each line in file2.txt:
home
school
cinema
so output file is:
... (19 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT CENTOS
service_seusers
service_seusers(5) SELinux configuration service_seusers(5)NAME
service_seusers - The SELinux GNU/Linux user and service to SELinux user mapping configuration files
DESCRIPTION
These are optional files that allow services to define an SELinux user when authenticating via SELinux-aware login applications such as
PAM(8).
There is one file for each GNU/Linux user name that will be required to run a service with a specific SELinux user name.
The path for each configuration file is formed by the path returned by selinux_policy_root(3) with /logins/username appended (where user-
name is a file representing the GNU/Linux user name). The default services directory is located at:
/etc/selinux/{SELINUXTYPE}/logins
Where {SELINUXTYPE} is the entry from the selinux configuration file config (see selinux_config(5)).
getseuser(3) reads this file to map services to an SELinux user.
FILE FORMAT
Each line within the username file is formatted as follows with each component separated by a colon:
service:seuser[:range]
Where:
service
The service name used by the application.
seuser
The SELinux user name.
range
The range for MCS/MLS policies.
EXAMPLES
Example 1 - for the 'root' user:
# ./logins/root
ipa:user_u:s0
this_service:unconfined_u:s0
Example 2 - for GNU/Linux user 'rch':
# ./logins/rch
ipa:unconfined_u:s0
that_service:unconfined_u:s0
SEE ALSO selinux(8), PAM(8), selinux_policy_root(3), getseuser(3), selinux_config(5)Security Enhanced Linux 28-Nov-2011 service_seusers(5)