06-18-2008
you can use....
suppose test is the file name and you want to comment line having gsnmpproxy
grep gsnmpproxy test| sed -ie 's/ ^/#/g'
Thanks-
Yogi
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
Discussion started by: MissI
3 Replies
2. Shell Programming and Scripting
Hi,
My requirement is to comment/uncomment a cron job through a script.
1. Redirected the output of crontab -l to a text file.
crontab -l >cronoutput.txt
2. grep to find the script running and sed to place the comment (#) as
the first char
grep -i 'weblogicmonitor.sh'... (5 Replies)
Discussion started by: mannepalli
5 Replies
3. Shell Programming and Scripting
Requirement is:
1. comment and uncomment the line with Shell
Script: /opt/admin/fastpg/bin/fastpg.exe -c -=NET (using fastpg.exe as a search option)
2. display = "Commented" (when its commented) and display = "Uncommented" (when its uncommented)
Its urgent, please let me asap!!!
Thanks in... (2 Replies)
Discussion started by: anthonyraj75
2 Replies
4. 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
5. Shell Programming and Scripting
Hi all,
I'm newbie and stuck here. Thanks for any help.
Input(txt file)
a b X
c d Y
e f Z
g h W
Requested output:
a b X Y
c d Y X
e f Z W
g h W Z
Please use code tags when posting data and code samples! (10 Replies)
Discussion started by: hernand
10 Replies
6. Shell Programming and Scripting
Hi experts,
I have a problem with the below shell task:
I need to modify the file creatin a paired row , per each row
which matches filter (e.g. number of nonempty columns = 5)
Output should look like this:
second row is original one from the input,
first row(red) is pairing row, it's... (29 Replies)
Discussion started by: hernand
29 Replies
7. Shell Programming and Scripting
Hi
I need help to comment/uncomment the output from grep command output within a file from command line using shell script.
# grep -i -p testfs filesystem.out
/TestFs:
dev = /dev/TestFslv
vfs = jfs2
log = /dev/hd8
mount ... (2 Replies)
Discussion started by: mbak
2 Replies
8. Shell Programming and Scripting
hi guys,
i need a script that does a simple task on multiple aix servers.
if possible with both telnet and ssh.
the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... :(
can anybody help me with making... (2 Replies)
Discussion started by: curtis911
2 Replies
9. UNIX for Dummies Questions & Answers
cd path
line1
line2
line3
line4
line5
Lets say thats the sample script...So say if i have to comment the above script, which would be the better way so that whenever i want, i cud comment or uncomment the same.
Thanks (1 Reply)
Discussion started by: saggiboy10
1 Replies
10. Shell Programming and Scripting
hi!
I want to comment and uncomment 2 lines in my config files that goes like:
CONTACT_LIST="abc@xyz.com;"
#CONTACT_LIST="def@xyz.com;"
I want to sawp the commnets in above lines and desired output should be:
#CONTACT_LIST="abc@xyz.com;"
CONTACT_LIST="def@xyz.com;"
Please suggest. (1 Reply)
Discussion started by: scriptNovice
1 Replies
LEARN ABOUT DEBIAN
extract
EXTRACT(1) General Commands Manual EXTRACT(1)
NAME
extract - determine meta-information about a file
SYNOPSIS
extract [ -bghLnvV ] [ -H hash-algorithm ] [ -i ] [ -l library ] [ -p type ] [ -x type ] file ...
DESCRIPTION
This manual page documents version 0.6.0 of the extract command.
extract tests each file specified in the argument list in an attempt to infer meta-information from it. Each file is subjected to the
meta-data extraction libraries from libextractor.
libextractor classifies meta-information (also referred to as keywords) into types. A list of all types can be obtained with the -L option.
OPTIONS
-b Display the output in BiBTeX format.
-g Use grep-friendly output (all keywords on a single line for each file). Use the verbose option to print the filename first, fol-
lowed by the keywords. Use the verbose option twice to also display the keyword types. This option will not print keyword types
or non-textual metadata.
-h Print a brief summary of the options.
-i Run plugins in-process (for debugging). By default, each plugin is run in its own process.
-l libraries
Use the specified libraries to extract keywords. The general format of libraries is .I [[-]LIBRARYNAME[:[-]LIBRARYNAME]*] where
LIBRARYNAME is a libextractor compatible library and typically of the form .Ijpeg. The minus before the libraryname indicates that
this library should be removed from the existing list. To run only a few selected plugins, use -l in combination with -n.
-L Print a list of all known keyword types.
-n Do not use the default set of extractors (typically all standard extractors, currently mp3, ogg, jpg, gif, png, tiff, real, html,
pdf and mime-types), use only the extractors specified with the .B -l option.
-p type
Print only the keywords matching the specified type. By default, all keywords that are found and not removed as duplicates are
printed.
-v Print the version number and exit.
-V Be verbose. This option can be specified multiple times to increase verbosity further.
-x type
Exclude keywords of the specified type from the output. By default, all keywords that are found and not removed as duplicates are
printed.
SEE ALSO
libextractor(3) - description of the libextractor library
EXAMPLES
$ extract test/test.jpg
comment - (C) 2001 by Christian Grothoff, using gimp 1.2 1
mimetype - image/jpeg
$ extract -V -x comment test/test.jpg
Keywords for file test/test.jpg:
mimetype - image/jpeg
$ extract -p comment test/test.jpg
comment - (C) 2001 by Christian Grothoff, using gimp 1.2 1
$ extract -nV -l png.so -p comment test/test.jpg test/test.png
Keywords for file test/test.jpg:
Keywords for file test/test.png:
comment - Testing keyword extraction
LEGAL NOTICE
libextractor and the extract tool are released under the GPL. libextractor is a GNU package.
BUGS
A couple of file-formats (on the order of 10^3) are not recognized...
AUTHORS
extract was originally written by Christian Grothoff <christian@grothoff.org> and Vidyut Samanta <vids@cs.ucla.edu>. Use <libextrac-
tor@gnu.org> to contact the current maintainer(s).
AVAILABILITY
You can obtain the original author's latest version from http://www.gnu.org/software/libextractor/
libextractor 0.6.0 Dec 20, 2009 EXTRACT(1)