10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello -
I am trying to use a global replace command but its not working.
Here is the cmd I am using in vi:
:%s/OLD/NEW/g
However, in my "NEW" I already have a "/" which is not making the replace work:
:%s/mytestscript.com:33232/mytestscript:70245/test.com/g
the... (2 Replies)
Discussion started by: DallasT
2 Replies
2. Shell Programming and Scripting
I am newbie to perl,
I am trying to use the below syntax to replace globally a string with a variable.
$ bash -version
GNU bash, version 2.05b.0(1)-release (powerpc-ibm-aix5.1)
Copyright (C) 2002 Free Software Foundation, Inc.
$ perl -version
This is perl, v5.8.8 built for... (2 Replies)
Discussion started by: jville
2 Replies
3. Shell Programming and Scripting
Hello
I need to search for a mult-line strngs(with spaces in between and qoted) in a file1 and replace that text with Fixed string globally in file1. The strng to search for is in file2.
The file is big with some 20K records. so speed and effciency is required
file1: (where srch & rplc... (0 Replies)
Discussion started by: Hiano
0 Replies
4. Shell Programming and Scripting
Hi all,
I want to replace a string of words but i dont want to worry about escaping the characters in that string .
For e.g. If my string is "work/" and i want to replace it with "nowork" .I have to type
%s/work\//nowork/g
Is there a way by which I wont need to worry about the data in... (1 Reply)
Discussion started by: sachinpawar2308
1 Replies
5. Shell Programming and Scripting
Hi all
I'm in need of a command which can replace a specified string with another string - across multiple files within multiple sub-directories (I intend to run it from / )
I've used the following to get a list of the files:
find . | xargs grep <string1>
But that's as far as I've got.... (7 Replies)
Discussion started by: huskie69
7 Replies
6. Shell Programming and Scripting
I am new to unix and awk/sed etc... using C-Shell.
Basically, I have a fixed length file that has 4 different record types on it, H, D, V, W all in column 1. I need to change all the W's in column 1 to D's. in the entire file. The W's can be anywhere in the file and must remain in the same... (3 Replies)
Discussion started by: jclanc8
3 Replies
7. Shell Programming and Scripting
Hi,
I need to change some strings from A to B in a number of files within a directory. Please can someone advise how do I do that?
Many thanks (5 Replies)
Discussion started by: canary
5 Replies
8. Shell Programming and Scripting
I have a file where the rows correspond to individuals and the columns are about 106 variables. Each variable is coded as either ACGT, and "missing" is coded as blank. This is a tab delimited file. I'm trying to replace all blanks (" ") with 0. The simple script I have is only replacing some of the... (3 Replies)
Discussion started by: epi8
3 Replies
9. Shell Programming and Scripting
Hi,
I have a dir containing many shell scripts. Each of these shell scripts state a database name (always the same), which I need to change to be a new database.
grep <database name> * brings back all the lines containing the database name. However, I need to change them to be something... (1 Reply)
Discussion started by: topcat8
1 Replies
10. UNIX for Dummies Questions & Answers
Gurus,
I have in my /tmp directory 26 files "filea", "fileb"..."filez". Each file contains the name of a database 'dwora' at many, many places within each file.
My boss decided to change the name of the db so I need to do (what i'd call) a global search&replace of that string in all my... (0 Replies)
Discussion started by: alan
0 Replies
SEMODULE(8) NSA SEMODULE(8)
NAME
semodule - Manage SELinux policy modules.
SYNOPSIS
semodule [options]... MODE [MODES]...
DESCRIPTION
semodule is the tool used to manage SELinux policy modules, including installing, upgrading, listing and removing modules. semodule may
also be used to force a rebuild of policy from the module store and/or to force a reload of policy without performing any other transac-
tion. semodule acts on module packages created by semodule_package. Conventionally, these files have a .pp suffix (policy package),
although this is not mandated in any way.
OPTIONS
-R, --reload
force a reload of policy
-B, --build
force a rebuild of policy (also reloads unless -n is used)
-D, --disable_dontaudit
Temporarily remove dontaudits from policy. Reverts whenever policy is rebuilt
-i,--install=MODULE_PKG
install/replace a module package
-u,--upgrade=MODULE_PKG
upgrade an existing module package, or install if the module does not exist
-b,--base=MODULE_PKG
install/replace base module package
-d,--disable=MODULE_NAME
disable existing module
-e,--enable=MODULE_NAME
enable existing module
-p,--path=ROOTPATH
use an alternate root path
-r,--remove=MODULE_NAME
remove existing module
-l,--list-modules
display list of installed modules (other than base)
-s,--store
name of the store to operate on
-n,--noreload
do not reload policy after commit
-h,--help
prints help message and quit
-v,--verbose
be verbose
EXAMPLE
# Install or replace a base policy package.
$ semodule -b base.pp
# Install or replace a non-base policy package.
$ semodule -i httpd.pp
# List non-base modules.
$ semodule -l
# Turn on all AVC Messages for which SELinux currently is "dontaudit"ing.
$ semodule -DB
# Turn "dontaudit" rules back on.
$ semodule -B
# Install or replace all non-base modules in the current directory.
$ semodule -i *.pp
# Install or replace all modules in the current directory.
$ ls *.pp | grep -Ev "base.pp|enableaudit.pp" | xargs /usr/sbin/semodule -b base.pp -i
SEE ALSO
checkmodule(8), semodule_package(8)
AUTHORS
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
The program was written by Karl MacMillan <kmacmillan@tresys.com>, Joshua Brindle <jbrindle@tresys.com>, Jason Tang <jtang@tresys.com>
Security Enhanced Linux Nov 2005 SEMODULE(8)