06-17-2005
this code works for me.....
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want my program(ksh) to execute further only if the return key is pressed.
Please help.
i have already tried "\n", "\r", "^M" .
Thanks in advance (2 Replies)
Discussion started by: AiK
2 Replies
2. UNIX for Dummies Questions & Answers
hi folks,
i am using sun solaris, when i press escape key in putty/netterm screen will blink for a second, plese let me know where this setting is done by my admin, what i feel is my admin must have set some control key for this so that screen will refresh each time i press escape key. please let... (1 Reply)
Discussion started by: sudheer157
1 Replies
3. Shell Programming and Scripting
Hello friends,
I want to write a shell script in bash shell .
Working for the script is to detect any key pressed and disply on screen as
"you have pressed: "
For example if user pressed F5 then a messaged has to be displayed as
"you have pressed F5.
Thank you. (4 Replies)
Discussion started by: pradeepreddy
4 Replies
4. Shell Programming and Scripting
hi Gurus, please why is this happening:
when i run this:
#!/bin/bash
declare -a name
declare -a ph
declare -a eid
r=0;
c=1;
i=1;
n=;
echo " name phone email_id"
while :
do
#if ; then
#break;
#else
echo -n "field $i:"; read name ph eid;
let "i++";
... (5 Replies)
Discussion started by: tprayush
5 Replies
5. Shell Programming and Scripting
Hello everyone.
I'm trying to create a script that waits a given amount of time unless a given key is pressed. I found a very useful thread here
https://www.unix.com/shell-programming-scripting/59605-trap-key-press-script.html
however, I cannot figure out a way of avoiding the keypress if the... (2 Replies)
Discussion started by: cue
2 Replies
6. Shell Programming and Scripting
Hi Experts,
I have a script in which I want to disable the "Enter" key press. Actually my script executes some process in background. So, till that background process is running, I don't want "Enter" key to be pressed by user. Is this can be achieved using trap command? (6 Replies)
Discussion started by: R0H0N
6 Replies
7. Shell Programming and Scripting
Hi all,
I need to know how to test a pressed key is arrowup or arrowdown and etc..
I found that the "echo" won't print anything if i enter the arrowup in the below code:
read
echo "you pressed $REPLY"
Then i find a way to achieve my goal.
1 #! /bin/bash
2
3 ARROWUP='\;then... (4 Replies)
Discussion started by: homeboy
4 Replies
8. Shell Programming and Scripting
How do i get rid of the ^C when i pressed Ctrl-C? (7 Replies)
Discussion started by: vietrice
7 Replies
9. Ubuntu
So I mounted a 12.04 LTS ISO, exported it via apache. Goy my netinstall files in place. Pointed Foreman to my install media the Preseed config files run. Life is good.
Server comes up, I run apt-get update and blam:
: Failed to fetch... (0 Replies)
Discussion started by: general_lee
0 Replies
LEARN ABOUT DEBIAN
dbix::class::helper::resultset::virtualview
DBIx::Class::Helper::ResultSet::VirtualView(3pm) User Contributed Perl Documentation DBIx::Class::Helper::ResultSet::VirtualView(3pm)
NAME
DBIx::Class::Helper::ResultSet::VirtualView - Clean up your SQL namespace (DEPRECATED)
VERSION
version 2.013002
SYNOPSIS
# note that this is normally a component for a ResultSet
package MySchema::ResultSet::Bar;
use strict;
use warnings;
use parent 'DBIx::Class::ResultSet';
__PACKAGE__->load_components('Helper::ResultSet::VirtualView');
# and then in code that uses the ResultSet Join with relation x
my $rs = $schema->resultset('Bar')->search({'x.name' => 'abc'},{ join => 'x' });
# 'x' now pollutes the query namespace
# So the following works as expected
my $ok_rs = $rs->search({'x.other' => 1});
# But this doesn't: instead of finding a 'Bar' related to two x rows (abc and
# def) we look for one row with contradictory terms and join in another table
# (aliased 'x_2') which we never use
my $broken_rs = $rs->search({'x.name' => 'def'});
my $rs2 = $rs->as_virtual_view;
# doesn't work - 'x' is no longer accessible in $rs2, having been sealed away
my $not_joined_rs = $rs2->search({'x.other' => 1});
# works as expected: finds a 'table' row related to two x rows (abc and def)
my $correctly_joined_rs = $rs2->search({'x.name' => 'def'});
DESCRIPTION
This component is will allow you to clean up your SQL namespace. See "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it
to your entire schema.
DEPRECATED
This component has been suplanted by DBIx::Class::ResultSet::as_subselect_rs. In the next major version(3) we will begin issuing a
warning on it's use. In the major version after that(4) we will remove it entirely.
METHODS
as_virtual_view
Act as a barrier to SQL symbols. The resultset provided will be made into a "virtual view" by including it as a subquery within the from
clause. From this point on, any joined tables are inaccessible to ->search on the resultset (as if it were simply where-filtered without
joins). See "SYNOPSIS" for example.
NOTE
You don't have to use this as a Component. If you prefer you can use it in the following manner:
# in code using ResultSet:
use DBIx::Class:Helper::VirtualView;
my $new_rs = DBIx::Class::Helper::VirtualView::as_virtual_view($rs);
THANKS
Thanks to ijw from #dbix-class for the idea for this helper (originally called seal), most of the code, and most of the documentation.
AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-18 DBIx::Class::Helper::ResultSet::VirtualView(3pm)