Hello all,
Iam newbie here and to unix programming. I have the following text file.
A:Woshington,B:London,C:Paris,D:Manchester,C:Lisbon,E:Cape town.
Now I would like extract this and store in database. here is the script I have tried but it did work.
CITY1:`echo "$text" | grep "A:"... (11 Replies)
Hi All,
I am new to Shell Scripting.
I have a file consisting of XML messages.Each message is associated with a timestamp value(it is not a xml field).I need to extract\copy all messages in a particular time interval and put in another new file using Shell Scripting. My XML looks like... (3 Replies)
hi everybody,
i have a file, in it I need to extract some data that follows a particular pattern..
For example: my file contains like
now running Speak225
sep 22 mon 16:34:05 2008
--------------------------------
... (4 Replies)
Hello Users,
I am new to unix. I have a requirement to extract the string in the folder with files names XXXX.sev.xxxxx.lookup (There are some more files which I am not interested in like xxxxx.include.xxx.lookup).
1) I am looking for the file with the name "sev" ending with "lookup"
... (11 Replies)
Hello
does anyone know of an awk that will extract log file entries between a specific date and time range, eg:
awk '/15\/Dec\/2010:16:10:00/, /15\/Dec\/2010:16:15:00/' access_log
but one that works?
Or a free command line log file analysis tool/script?
I'd like to be able to view... (2 Replies)
I need to extract strings from a file.
The file contains data like:
Plan ABCD
IN-+-172BB---118C2C---GGN_342-+-MM77_23--+-LAS24_3|GGK_774
| | \-LAS24_2|GGN_774
| +-AA_800_1-+-BAS_000|GGK_362
| | \-BAS_001|GGK_360
| \-DD_000T1---DAM_001|STEEL_0
Plan SHELL_1... (3 Replies)
Suppose im in a directory A. which has sub-directories x/y/z m/n/p etc. Iam only considered with those which have a file netl.oa at the lowermost level. So i used the find command which gives me a list in the form
./abc/def/ghi/jkl/netl.oa
and so on
Now i want the names abc def jkl and ghi. My... (3 Replies)
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......qrt: ....
.......xyz: abz: ......qrt: ...
I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
I have something like this:
bash-3.2$ svn info
Path: .
URL: svn+ssh://nlaedev01@10.209.194.15/files0/nlae_dev_svn/repos/newlook-endeca/trunk
Repository Root: svn+ssh://nlaedev01@10.209.194.15/files0/nlae_dev_svn/repos/newlook-endeca
Repository UUID: 4e8fbe85-c2e2-42fe-a5fa-f9f9100d2393... (3 Replies)
i want to extract all data with in parenthesis from a file by passing a pattern from another file.i have some sql statements in my file and i want to extract those ddl by refering to a pattern which is in another file and before writting into file i need some transformation to do.Basically i want... (1 Reply)
Discussion started by: raj121
1 Replies
LEARN ABOUT DEBIAN
test::www::declare
Test::WWW::Declare(3pm) User Contributed Perl Documentation Test::WWW::Declare(3pm)NAME
Test::WWW::Declare - declarative testing for your web app
SYNOPSIS
use Test::WWW::Declare tests => 3;
use Your::Web::App::Test;
Your::Web::App::Test->start_server;
session 'testuser' => run {
flow 'log in and out' => check {
flow 'log in' => check {
get 'http://localhost/';
fill form 'login' => {
username => 'testuser',
password => 'drowssap',
};
content should contain 'log out';
};
flow 'log out' => check {
get 'http://localhost/';
click href 'log out';
};
};
};
DESCRIPTION
Often in web apps, tests are very dependent on the state set up by previous tests. If one test fails (e.g. "follow the link to the admin
page") then it's likely there will be many more failures. This module aims to alleviate this problem, as well as provide a nicer interface
to Test::WWW::Mechanize.
The central idea is that of "flow". Each flow is a sequence of commands ("fill in this form") and assertions ("content should contain
'testuser'"). If any of these commands or assertions fail then the flow is aborted. Only that one failure is reported to the test harness
and user. Flows may also contain other flows. If an inner flow fails, then the outer flow fails as well.
FLOWS AND SESSIONS
session NAME => run { CODE }
Sessions are a way of associating a set of flows with a WWW::Mechanize instance. A session is mostly equivalent with a user interacting
with your web app.
Within a session, every command ("get", "click link", etc) is operating on that session's WWW::Mechanize instance. You may have multiple
sessions in one test file. Two sessions with the same name are in fact the same session. This lets you write code like the following,
simplified slightly:
session 'first user' => run {
get "$URL/give?task=1&victim=other";
session 'other user' => run {
get "$URL/tasks";
content should match qr/task 1/;
# this is the same session/mech as the outermost 'first user'
session 'first user' => run {
get "$URL/tasks";
content shouldnt match qr/task 1/;
};
};
};
flow NAME => check { CODE }
A flow encompasses a single test. As described above, each flow is a sequence of commands, assertions, and other flows. If any of the
components of a flow fail, the rest of the flow is aborted and one or more test failures are reported to the test harness.
COMMANDS
get URL
click button
click href
follow_link
fill form NAME => {FIELD1 => VALUE1, FIELD2 => VALUE2}
ASSERTIONS
Every assertion has two parts: a subject and a verb.
SUBJECTS
content
title
url
VERBS
should(nt) (caselessly) match REGEX
should(nt) (caselessly) contain STRING
should(nt) (caselessly) lack STRING
should(nt) (caselessly) equal STRING
SUBCLASSING
One of the goals of this module is to let you subclass it to provide extra features, such as automatically logging in a user each time a
session is created.
CAVEATS
If you fail any tests, then the actual number of tests run may be fewer than you have in your file. This is because when a flow fails, it
immediately aborts the rest of its body (which may include other flows). So if you're setting the number of tests based on how many ran,
make sure that all tests passed.
BUGS
Hopefully few. We'd like to know about any of them. Please report them to "bug-test-www-declare@rt.cpan.org".
SEE ALSO
Test::WWW::Mechanize, Jifty.
MAINTAINER
Shawn M Moore "<sartak@bestpractical.com>"
ORIGINAL AUTHOR
Jesse Vincent "<jesse@bestpractical.com>"
COPYRIGHT
Copyright 2007-2008 Best Practical Solutions, LLC
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2008-10-12 Test::WWW::Declare(3pm)