11-30-2005
see the man pages of 'find ' command
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
2. Shell Programming and Scripting
hi every one ,
here is my problem !!
i have to run my script from an account and update the result in a xml file located on a different account. i use existing ssh keys to do it remotely
for example the tags looks like this
<PropertyValueList... (1 Reply)
Discussion started by: kiranreddy1215
1 Replies
3. UNIX for Dummies Questions & Answers
using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked
how can I do this?
I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like.
Thanks! (0 Replies)
Discussion started by: alternapop
0 Replies
4. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
5. Shell Programming and Scripting
Hi All,
The script below read the path and searches for the directories/subdirectories and for the files. If files are found in the sub directories then read the content of the all files and put the content in csv(comma delimted) format and the call the write to xml function to write the
std... (1 Reply)
Discussion started by: Optimus81
1 Replies
6. UNIX for Advanced & Expert Users
Need help on moving .csv file from unix to windows file path. (1 Reply)
Discussion started by: lakshmanraok117
1 Replies
7. UNIX for Advanced & Expert Users
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
8. UNIX for Beginners Questions & Answers
Hi All,
I just want to move the file from one path to another using .sh file in EBS oracle apps.
I have written in .prog but i need in .sh (file.sh)
XXC_SAMPLE_FILE.prog
#!/bin/bash
# XXC_SAMPLE_FILE.prog
DATE_TIME=`date | awk {' print $1"_"$2"_"$3"_"$4 '}`
echo "parse_parms"
... (4 Replies)
Discussion started by: Mist123
4 Replies
9. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
10. UNIX for Beginners Questions & Answers
I'm curious to know how do I add an empty log file (test1.log) to an existing text file to monitor all the changes made to a.txt.
Is this expression
export PATH=$PATH:/home/test1.log
right to be added to the text file a.txt? (5 Replies)
Discussion started by: TestKing
5 Replies
LEARN ABOUT DEBIAN
swish::api::common
SWISH::API::Common(3pm) User Contributed Perl Documentation SWISH::API::Common(3pm)
NAME
SWISH::API::Common - SWISH Document Indexing Made Easy
SYNOPSIS
use SWISH::API::Common;
my $swish = SWISH::API::Common->new();
# Index all files in a directory and its subdirectories
$swish->index("/usr/local/share/doc");
# After indexing once (it's persistent), fire up as many
# queries as you like:
# Search documents containing both "swish" and "install"
for my $hit ($swish->search("swish AND install")) {
print $hit->path(), "
";
}
DESCRIPTION
"SWISH::API::Common" offers an easy interface to the Swish index engine. While SWISH::API offers a complete API, "SWISH::API::Common"
focusses on ease of use.
THIS MODULE IS CURRENTLY UNDER DEVELOPMENT. THE API MIGHT CHANGE AT ANY TIME.
Currently, "SWISH::API::Common" just allows for indexing documents in a single directory and any of its subdirectories. Also, don't run
index() and search() in parallel yet.
INSTALLATION
"SWISH::API::Common" requires "SWISH::API" and the swish engine to be installed. Please download the latest release from
http://swish-e.org/distribution/swish-e-2.4.3.tar.gz
and untar it, type
./configure
make
make install
and then install SWISH::API which is contained in the distribution:
cd perl
perl Makefile.PL
make
make install
METHODS
$sw = SWISH::API::Common->new()
Constructor. Takes many options, but the defaults are usually fine.
Available options and their defaults:
# Where SWISH::API::Common stores index files etc.
swish_adm_dir "$ENV{HOME}/.swish-common"
# The path to swish-e, relative is OK
swish_exe "swish-e"
# Swish index file
swish_idx_file "$self->{swish_adm_dir}/default.idx"
# Swish configuration file
swish_cnf_file "$self->{swish_adm_dir}/default.cnf"
# SWISH Stemming
swish_fuzzy_indexing_mode => "Stemming_en"
# Maximum amount of data (in bytes) extracted
# from a single file
file_len_max 100_000
# Preserve every indexed file's atime
atime_preserve
$sw->index($dir, ...)
Generate a new index of all text documents under directory $dir. One
or more directories can be specified.
$sw->search("foo AND bar");
Searches the index, using the given search expression. Returns a list hits, which can be asked for their path:
# Search documents containing
# both "foo" and "bar"
for my $hit ($swish->search("foo AND bar")) {
print $hit->path(), "
";
}
index_remove
Permanently delete the current index.
TODO List
* More than one index directory
* Remove documents from index
* Iterator for search hits
LEGALESE
Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the
same terms as Perl itself.
AUTHOR
2005, Mike Schilli <cpan@perlmeister.com>
perl v5.10.0 2008-07-08 SWISH::API::Common(3pm)