8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I am a new in scripting language and I would like help for you guys
I would like to create a file named constant.h and search into all files *.m in specific directory for a reg-exp @"LBL_]+" exp: @"LBL_75847" , and write those matchs to constant.h if there are not written (no... (15 Replies)
Discussion started by: molwiko
15 Replies
2. Shell Programming and Scripting
$var1="LEN";
$VAR2="CODLENTT";
now, var2 contains var1(LEN).How do i check this in perl....
whether one string is a part of another..?
if (<logic>)
{
my operation;
}
what'd be the logic.. (4 Replies)
Discussion started by: vijay_0209
4 Replies
3. Shell Programming and Scripting
Hi,
I am using the following piece of code for extracting some data from in between some tags ...
$text =~ /<TAG1>(.*)<\/TAG1>.*<TAG2>(.*)<\/TAG2>.*<TAG3>(.*)<\/TAG4>.*<TAG5>(.*)<\/TAG5>/;
$tag1=$1;
print "\n$tag1";
But I am getting an error like
Use of uninitialized value in... (1 Reply)
Discussion started by: King Nothing
1 Replies
4. UNIX for Dummies Questions & Answers
Hi, I need
to make some extraction . with the following input to get the right output.
input: /etc/exp/home/bin ====> output: exp
and
input: aex1234 ===> output: ex
Thanks for your help, (4 Replies)
Discussion started by: yeclota
4 Replies
5. Shell Programming and Scripting
$ cat file.txt
asd
<AA>dev
<LL>def
<RR>sha
This works for me:
$ sed -r 's/^ .*<LL>def/\t<LL>my/' file.txt
asd
<AA>dev
<LL>my
<RR>sha
But, this does not work for me:
$ sed -r 's/^\s+<LL>def/\t<LL>my/' file.txt
asd
... (1 Reply)
Discussion started by: demoprog
1 Replies
6. Shell Programming and Scripting
Hi,
Should be a difference between ']]*' and ']+' ?
I use them in bash with sed and grep.
Thanks (1 Reply)
Discussion started by: ynir
1 Replies
7. Shell Programming and Scripting
in shell scripting there is extensive usage of
i> regular expression
ii>sed
iii>awk
can anyone tell me the suitable contexts ...i mean which one is suitable for what kind of operation.
like the reg-exp and sed seems to be doing the same job..i.e pattern matching (1 Reply)
Discussion started by: mobydick
1 Replies
8. Shell Programming and Scripting
Any idea please:
How to pass a reg. exp. variable to awk call in a shell???
Thank u
#!/bin/sh
reg_exp=name
awk '/reg_exp/{
print;
}' $1 (5 Replies)
Discussion started by: andy2000
5 Replies
SCOUT(1) http://en.opensuse.org/Sco SCOUT(1)
NAME
scout - A Package Scout
SYNOPSIS
scout [global_options] {module} {search_term} [module_options]
OPTIONS
The following options are available:
global_options, module
The global options are handled by scout itself.
--format
Specify the default output format. Choices are table (default), xml, csv. It's a replacement of the older scoutcsv, scoutxml links.
--help
Print a brief help.
--version
Print version.
The respective module to search for. The following modules are available:
autoconf
Search for autoconf macros inside m4 files.
bin
Search for binaries contained in packages.
header
Search for C/C++/Obj-C/Obj-C++ headers
java
Search for Java classes inside packaged JAR files.
python
Search for Python modules.
webpin
Search in packages using the Webpin webservice.
search_term
The term you are looking for.
module_options
Additional module options. At the moment these are:
--listrepos
list all available repositories
--repos=REPO, -r REPO
select a repository to search (use a name from the --listrepos output)
DESCRIPTION
Scout is a tool to look for uninstalled packages. For example, which binary does a package provide, which Java classes are available and
which autoconf macros does a package contain.
To search for your requested term, you need index data files which are a preconfigured SQLite 3 database. You have to install these in
order to get your search request done. Use the Scout OBS data repository[1] to get additional index files. See the Wiki page about Scout[2]
for more information.
EXAMPLE 1: SEARCH FOR EXECUTABLES
For example, to search for a sdl-config executable, you need the bin module:
$ scout bin sdl-config
You get the following output:
repository | binary | path | package
------------+------------+-----------------------------+-----------------
suse110 | sdl-config | /usr/bin | SDL-devel
suse110 | sdl-config | /usr/lib/baselibs-32bit/bin | SDL-devel-32bit
EXAMPLE 2: SEARCH FOR JAVA PACKAGES
If you want to search for a Java package, use the following code:
$ scout java org.apache.xml.serialize.Serializer
You get:
repository | package | jar | class
------------+------------------+---------------------+------------------------------------------------
jpackage17 | jboss4-testsuite | xerces.jar | org.apache.xml.serialize.Serializer
jpackage17 | jboss4-testsuite | xerces.jar | org.apache.xml.serialize.SerializerFactory
jpackage17 | jboss4-testsuite | xerces.jar | org.apache.xml.serialize.SerializerFactoryImpl
jpackage17 | xerces-j2 | xerces-j2-2.9.0.jar | org.apache.xml.serialize.Serializer
jpackage17 | xerces-j2 | xerces-j2-2.9.0.jar | org.apache.xml.serialize.SerializerFactory
jpackage17 | xerces-j2 | xerces-j2-2.9.0.jar | org.apache.xml.serialize.SerializerFactoryImpl
EXAMPLE 3: SEARCH THROUGH WEBPIN
If you want to use the openSUSE Search Webservice[3]--also known as "Webpin"--use the following line:
$ scout webpin docbook_5.xml
You get:
package | version | arch | repository URL | matched files
-----------+---------+--------+-----------------------------------------------------------------------------------+------------------------
docbook_5 | 5.0 | noarch | http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/suse | /etc/xml/docbook_5.xml
docbook_5 | 5.0CR7 | noarch | http://download.opensuse.org/repositories/home:/thomas-schraitle/openSUSE_Factory | /etc/xml/docbook_5.xml
docbook_5 | 5.0 | noarch | http://download.opensuse.org/repositories/XML/xml-factory | /etc/xml/docbook_5.xml
BASH COMPLETION
If you like to complete your options automatically through Bash, insert the following lines into your ~/.bashrc or /etc/bash.bashrc:
if [ -f /etc/bash_completion.d/scout.sh ]; then
. /etc/bash_completion.d/scout.sh
fi
SEE ALSO
command-not-found(1)
AUTHORS
Pavol Rusnak <stick@gk2.sk>
Developer
Michal Vyskocil <mvyskocil@suse.cz>
Developer
Ales Nosek <anosek@suse.cz>
Index data for Java
Pascal Bleser <guru@unixtech.be>
Webpin code
Marek Stopka <mstopka@opensuse.org>
Bash completion
Thomas Schraitle <toms@suse.de>
Docbook documentation
Klaus Kaempf <kkaempf@suse.de>
Help with python-satsolver
NOTES
1. Scout OBS data repository
http://download.opensuse.org/repositories/home:/prusnak:/scout/data
2. Wiki page about Scout
http://en.opensuse.org/Scout
3. openSUSE Search Webservice
http://software.opensuse.org/search
http://gitorious.org/opensus 08/07/2009 SCOUT(1)