03-02-2014
("You are trying to run before you can walk.")
I was unsure whether to post this but decided to so in the end...
Look at your error report(s)...
Your code says "bunny", you say it is "Bunny". Which is it?
More to the point WHERE is it?
Either change the full path to point to it directly or ensure it is in the
your current drawer that this code is looking at...
Also ensure you have the needed permissions to access it.
I also quoted the code as being _old_style_ bash scripting so as to hopefully
give you some insight and to search the WWW for what each line might
be doing and for you to greatly improve on it.
Also it will only work for lines 10 - 19, if you want 20 - pseudo_infinity
then have a go at working it out for yourself; it does get difficult but you'll
learn a lot quickly by mistakes and finding out how to correct them.
Yes it can be improved considerably and there are some seriously clever
guys on here capable of doing it...
There are also different methods too but my method was purely to
demonstrate that it can be done the way I originally stated in my pseudo_code
post...
I, (an amateur), and my professional _cousins_ on here, cannot possibly
be a tutorial class. There are many tutorials to be found on the WWW including
this site to help you and the Admin have prepared all the "man" pages too...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Context:
I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ):
1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed
2 her true love Sho to Tokyo to... (6 Replies)
Discussion started by: Bubnoff
6 Replies
2. Shell Programming and Scripting
Hi Guys,
I have data in a file as follows:
a 1 2 3
b 4 5 6
a 6 7 8
a 4 7 9
b 6 8 5
c 0 8 7
So the number of rows which have data is variable (2 for the first group, one for the second group and three for the third group), but the delimiters between the... (10 Replies)
Discussion started by: npatwardhan
10 Replies
3. Shell Programming and Scripting
Hello, there. I have a file that's a horrible, horrible mess. (Basically, it's an export from a firewall config.) The people who generated the file didn't think that putting a newline in the middle of a hostname would ever be a problem. It is.
Here's an example of the stuff in the file:
... (2 Replies)
Discussion started by: mikesimone
2 Replies
4. Shell Programming and Scripting
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Discussion started by: rishav
6 Replies
5. Shell Programming and Scripting
Hi All,
I have a file which looks like this:
abc 3456
computer 3214
printer 0.9823
computer 3214
Can anyone please let me know how I can format my text like this?
abc 3456 computer 3214 printer 0.9823 computer 3214
I know how to space to newlines using tr but don't know how to do... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies
6. Shell Programming and Scripting
Hello! This is my first post here.
I have a file with text like:
A</title>
B
C</title>
D
I need to format it to:
AB
CD
I am trying to use sed: sed 's/<//title>\n/ /g' file > newfile
to delete </title> and the newline character, but the file is unchanged because there are... (3 Replies)
Discussion started by: DaytonCPS
3 Replies
7. Shell Programming and Scripting
Good morning,
I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need.
Here is the script as it is today:
#!/usr/bin/perl
my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
Discussion started by: brianjb
2 Replies
8. UNIX for Dummies Questions & Answers
I want to list all html files present in a directory tree, the remove the newline and get one string with a space between files
find /home/chrisd/Desktop/seg/geohtml/ -name '*.html' | awk BEGIN{FS=\r} '{print}'
---------- Post updated at 06:47 PM ---------- Previous update was at 06:25 PM... (5 Replies)
Discussion started by: kristinu
5 Replies
9. UNIX for Beginners Questions & Answers
I need to remove new lines and carriage returns from csv file.
Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
Discussion started by: A_Gaddale
3 Replies
10. Shell Programming and Scripting
Hi Friends,
I have a data file with new lines.
How to remove the newlines and should be showed in one line.
I tried using the command
tr -d '\n' filename
sed 's/\n//g' file name
Ex: 1 abc hyd is actual record
but in our scenario showing it as
1 abc
hydthis record should be like... (5 Replies)
Discussion started by: victory
5 Replies
LEARN ABOUT DEBIAN
www::search::yahoo
WWW::Search::Yahoo(3pm) User Contributed Perl Documentation WWW::Search::Yahoo(3pm)
NAME
WWW::Search::Yahoo - backend for searching www.yahoo.com
SYNOPSIS
use WWW::Search;
my $oSearch = new WWW::Search('Yahoo');
my $sQuery = WWW::Search::escape_query("sushi restaurant Columbus Ohio");
$oSearch->native_query($sQuery);
while (my $oResult = $oSearch->next_result())
print $oResult->url, "
";
DESCRIPTION
This class is a Yahoo specialization of WWW::Search. It handles making and interpreting Yahoo searches http://www.yahoo.com.
This class exports no public interface; all interaction should be done through WWW::Search objects.
NOTES
The default search is: Yahoo's web-based index (not Directory).
PRIVATE METHODS
If you just want to write Perl code to search Yahoo, you do NOT need to read any further here. Instead, just read the WWW::Search
documentation.
If you want to write a subclass of this module (e.g. create a backend for another branch of Yahoo) then please read about the private
methods here:
gui_query
Yes, Virginia, we do try to emulate stupid-human queries.
need_to_delay
This method tells the WWW::Search controller code whether we need to pause and give the yahoo.com servers a breather.
user_agent_delay
This method tells the WWW::Search controller code how many seconds we should pause.
preprocess_results_page
Clean up the Yahoo HTML before we attempt to parse it.
_result_list_tags
Returns a list, which will be passed as arguments to HTML::Element::look_down() in order to return a list of HTML::Element which contain
the query results.
_result_list_items
Given an HTML::TreeBuilder tree, returns a list of HTML::Element, which contain the query results.
parse_details
Given a (portion of an) HTML::TreeBuilder tree and a WWW::SearchResult object, parses one result out of the tree and populates the
SearchResult.
_where_to_find_count
Returns a list, which will be passed as arguments to HTML::Element::look_down() in order to return an HTML::Element which contains the
approximate result count.
_string_has_count
Given a string, returns the approximate result count if that string contains the approximate result count.
_a_is_next_link
Given an HTML::Element, returns true if it seems to contain the clickable "next page" widget.
strip
Given a string, strips leading and trailing whitespace off of it.
SEE ALSO
To make new back-ends, see WWW::Search.
BUGS
Please tell the maintainer if you find any!
AUTHOR
As of 1998-02-02, "WWW::Search::Yahoo" is maintained by Martin Thurn (mthurn@cpan.org).
"WWW::Search::Yahoo" was originally written by Wm. L. Scheding, based on "WWW::Search::AltaVista".
LEGALESE
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
LICENSE
Copyright (C) 1998-2009 Martin 'Kingpin' Thurn
This software is released under the same license as Perl itself.
perl v5.12.4 2011-11-02 WWW::Search::Yahoo(3pm)