Try this code and verify if you are getting desired output:-
If yes, then you can redirect the output to a temporary file and rename it back to original file: blacklist-sound.conf
Hi,
compare two .dat files and difference will be moved into separate file.if anybody having code for this please send asap. using diff command, i don't know how to write shell programming.
and my first file is like this including Header and trailer
10Ç20060323Ç01(Header)
01ÇIÇbabuÇ3000
01ÇIÇbaluÇ4000... (1 Reply)
Id like to delete a line from a file using (preferably a single line unix command) if it contains a certain string pattern.
If line contains "abcdef" then delete that line.
Help greatly appreciated. (7 Replies)
I have a very large system generated file containing around 500K rows size 100MB like following
HOME|ALICE STREET|3||NEW LISTING
HOME|NEWPORT STREET|1||NEW LISTING
HOME|KING STREET|5||NEW LISTING
HOME|WINSOME AVENUE|4||MODIFICATION
CAR|TOYOTA|4||NEW LISTING
CAR|FORD|4||NEW... (9 Replies)
Hello,
I want to delete all lines with given string in file1 and the string val is dynamic.
Can this be done using sed command.
Sample:
vars="test twinning yellow"
for i in $vars
do
grep $i file1
if
then
echo "Do Nothing"
else
sed `/$i/d` file1
fi
done
Using the above... (5 Replies)
Hello,
:wall:
I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books.
I know this does not work
/^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d
Any ideas?
Thanks
Please... (2 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 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)
I have two files:
smw:/working/iso_testing # cat a
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm
aaa_base-13.2+git20140911.61c1681-1.3.i586.rpm
acpica-20140724-2.1.2.i586.rpm
test.rpm
smw:/working/iso_testing # cat b
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm... (12 Replies)
Hi,
I have a working script.
It does what I am intending it to but a bit confused whether the sed part is supposed to be working or not. Further down is the script with the sed part that should have been working but not and the grep -v part which is the workaround that I am using at the... (10 Replies)
Discussion started by: newbie_01
10 Replies
LEARN ABOUT CENTOS
cgsnapshot
CGSNAPSHOT(1) libcgroup Manual CGSNAPSHOT(1)NAME
cgsnapshot - generate the configuration file for given controllers
SYNOPSIS
cgsnapshot [-h] [-s] [-t] [-b file] [-w file] [-f output_file] [controller] [...]
DESCRIPTION
cgsnapshot generates the cgconfig compatible configuration file for the given controllers. If no controller is set, then cgsnapshot shows
all mounted hierarchies. The output is in the same format as the cgconfig.conf configuration file.
-b file
Display only variables from the blacklist. The default location of the blacklist is /etc/cgsnapshot_blacklist.conf. This list con-
tains all variables which should be ignored by the cgsnapshot If the variable is blacklisted, it will not be displayed. If it is
not present on the blacklist, the whitelist is checked.
-h, --help
display this help and exit
-f, --file
Redirect the output to output_file
-s, --silent
Ignore all warnings
-t, --strict
Do not display the variables which are not on the whitelist
-w file
Set the blacklist configuration file. This list contains all variables which should be displayed by cgsnapshot If the variable is
not blacklisted, the whitelist is checked. If the variable is on the whitelist, it is displayed by cgsnapshot If the variable is
not on the whitelist, the variable is displayed and a warning message is produced. By default the whitelist is not used.
The warning message can be omitted using the -s, --silent flag. If the -t, --strict flag is used, the variable which is not on the
whitelist is not displayed.
controller
defines the controller whose hierarchies will be output
ENVIRONMENT VARIABLES
CGROUP_LOGLEVEL
controls verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.
FILES
/etc/cgsnapshot_blacklist.conf
default blacklist
/etc/cgsnapshot_whitelist.conf
default whitelist
/etc/cgconfig.conf
default libcgroup configuration file
SEE ALSO
cgconfig.conf (5)
Linux 2010-07-28 CGSNAPSHOT(1)