03-04-2008
help... no idea what to use
my issue now is i have a txt file containing a list like below
Quote:
0006EME0JRWUWOFQ
0006EME0JRWUWOIC
0006EME0JRWUWOM9
0006EME0JRWUWOQ5
0006EME0JRWUWP0Z
0006EME0JRWUWP72
0006EME0JRWUWPBE
0006EME0JRWUWPFB
0006EME0JRWUWPKI
0006EME0JRWUWPPA
0006EME0JRWUWQ3L
0006EME0JRWWKRLV
0006EME0JRWWKRQ7
0006EME0JRWWKS2C
0006EME0JRWWKS4X
i want to create a script that will add a constant text "Find this name" at the start and "at your directory" at the end. every line should be added by phrase at the start and end.
Each line of the file should look like "Find this name 0006EME0JRWWKS4X at your directory"
thanks
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Discussion started by: yongho
2 Replies
2. Shell Programming and Scripting
Does anyone know how to test if an ethernet interface is alive, or accepting connections? Here is the scenario - I have rsc and sc console interfaces on some Suns. There are some sporadic vulnerability scans that send them out to lunch when they run the scans. I have to login to the host and reset... (0 Replies)
Discussion started by: lm_admin_dh
0 Replies
3. Shell Programming and Scripting
I'm new to the script programming and I have this piece of code (repeatedly used) in my program:
while :
do
................
ans=`ckyorn -p "Do you want to continue?"`
if || || || ; then
break
elif || ; then
echo "Aborting..."
exit... (2 Replies)
Discussion started by: bluemoon1
2 Replies
4. Shell Programming and Scripting
Getting some errors when i run this script..
./xml_load_process.txt: -jar: not found
./xml_load_process.txt: syntax error at line 31 : `then' unmatched
any ideas...really miffed at my inability to spot the error....
#!/bin/ksh
# set -o xtrace
# set environment variables
export... (3 Replies)
Discussion started by: jazz21
3 Replies
5. UNIX for Advanced & Expert Users
Hi friends..
I am using the below command to search few files from many folders which is under one folder..
i mean let say the path is A/B/C...and inside C...i have 1-10 folder...
the below command is working fine....
find /A/B/C -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name... (1 Reply)
Discussion started by: sapan123
1 Replies
6. Shell Programming and Scripting
Hi there, I'm pretty new to scripting and wondering if anyone had any idea's, scripts or snippets on how I can do the following.
I basically want a shell script that will look at all the files in a directory and find all the names and addresses in them then output them to the screen nicely... (12 Replies)
Discussion started by: mrpugster
12 Replies
7. AIX
hi
when i tried to connect to other server through ""ssh servername" ...
i am getting following error..
ssh: connect to host nimsrv01 port 22: A remote host refused an attempted connect operation.
what should i do.. any ideas?
thanks (7 Replies)
Discussion started by: honeym210
7 Replies
8. Shell Programming and Scripting
Hello everybody,
I am new here as well as in scripting.
I need some help. I have log files that are boring to examine. I wanted to use awk to do this:
-get the lines that match the eight field (user mac address)
-now sort them according to date (first 2 fields)
-print the following:
... (4 Replies)
Discussion started by: anaABB
4 Replies
9. Shell Programming and Scripting
Hi all, I now have project in UNIX Solaris and I want to have some new ideas to execute it, so I hope you help me finding new ideas in scripting or some infrastructure .bye (1 Reply)
Discussion started by: hard_revenge
1 Replies
LEARN ABOUT DEBIAN
file::find::object
File::Find::Object(3pm) User Contributed Perl Documentation File::Find::Object(3pm)
NAME
File::Find::Object - An object oriented File::Find replacement
SYNOPSIS
use File::Find::Object;
my $tree = File::Find::Object->new({}, @targets);
while (my $r = $tree->next()) {
print $r ."
";
}
DESCRIPTION
File::Find::Object does same job as File::Find but works like an object and with an iterator. As File::Find is not object oriented, one
cannot perform multiple searches in the same application. The second problem of File::Find is its file processing: after starting its main
loop, one cannot easilly wait for another event and so get the next result.
With File::Find::Object you can get the next file by calling the next() function, but setting a callback is still possible.
FUNCTIONS
new
my $ffo = File::Find::Object->new( { options }, @targets);
Create a new File::Find::Object object. @targets is the list of directories or files which the object should explore.
options
depth
Boolean - returns the directory content before the directory itself.
nocrossfs
Boolean - doesn't continue on filesystems different than the parent.
followlink
Boolean - follow symlinks when they point to a directory.
You can safely set this option to true as File::Find::Object does not follow the link if it detects a loop.
filter
Function reference - should point to a function returning TRUE or FALSE. This function is called with the filename to filter, if the
function return FALSE, the file is skipped.
callback
Function reference - should point to a function, which would be called each time a new file is returned. The function is called with
the current filename as an argument.
next
Returns the next file found by the File::Find::Object. It returns undef once the scan is completed.
item
Returns the current filename found by the File::Find::Object object, i.e: the last value returned by next().
next_obj
Like next() only returns the result as a convenient File::Find::Object::Result object. "$ff->next()" is equivalent to
"$ff->next_obj()->path()".
item_obj
Like item() only returns the result as a convenient File::Find::Object::Result object. "$ff->item()" is equivalent to
"$ff->item_obj()->path()".
$ff->set_traverse_to([@children])
Sets the children to traverse to from the current node. Useful for pruning items to traverse.
$ff->prune()
Prunes the current directory. Equivalent to $ff->set_traverse_to([]).
[@children] = $ff->get_traverse_to()
Retrieves the children that will be traversed to.
[@files] = $ff->get_current_node_files_list()
Gets all the files that appear in the current directory. This value is constant for every node, and is useful to use as the basis of the
argument for "set_traverse_to()".
BUGS
No bugs are known, but it doesn't mean there aren't any.
SEE ALSO
There's an article about this module in the Perl Advent Calendar of 2006: <http://perladvent.pm.org/2006/2/>.
File::Find is the core module for traversing files in perl, which has several limitations.
File::Next, File::Find::Iterator, File::Walker and the unmaintained File::FTS are alternatives to this module.
LICENSE
Copyright (C) 2005, 2006 by Olivier Thauvin
This package is free software; you can redistribute it and/or modify it under the following terms:
1. The GNU General Public License Version 2.0 - http://www.opensource.org/licenses/gpl-license.php
2. The Artistic License Version 2.0 - http://www.perlfoundation.org/legal/licenses/artistic-2_0.html
3. At your option - any later version of either or both of these licenses.
perl v5.10.0 2009-06-18 File::Find::Object(3pm)