12-01-2010
hey
hey can u post sample input file and the required output!!
use code tags
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a script abc.sql which contains a word 'timestamp'.
I have another script xyz.txt genrated everyweek, which has a new timestamp value every week.
How do I replace the word 'timestamp' in script abc.sql with the value mentioned in the script xyz.txt, so that I can run the script... (3 Replies)
Discussion started by: kaushys
3 Replies
2. Shell Programming and Scripting
hey all,
i was just wondering if it was possible to to get data from user input , and parse it through sed to remove or add what that user has entered into a flat file?
do i need awk ?
any help is greatly appreciated
~shan2on (2 Replies)
Discussion started by: shan2on
2 Replies
3. Shell Programming and Scripting
in shell scripting there is extensive usage of
i> regular expression
ii>sed
iii>awk
can anyone tell me the suitable contexts ...i mean which one is suitable for what kind of operation.
like the reg-exp and sed seems to be doing the same job..i.e pattern matching (1 Reply)
Discussion started by: mobydick
1 Replies
4. UNIX for Dummies Questions & Answers
I need to change all Newline caracters (\12) to Fieldseparator(\34).
tr -A '\12' '\34' <file1> file2
Replace all delete (\177) with Newline (\12)
tr -A '\177' '\12' <file2> file3
Put the name of the file first in all rows.
awk '{printf "%s\34%s\n", FILENAME,$0} file3 > file4
So far no... (6 Replies)
Discussion started by: MrKlint
6 Replies
5. Shell Programming and Scripting
Hello everybody,
I trying to convert a text inside my file that looks something like this:
into hyperlink so that the user can click onto it.....
I tried this but doesn't work
cat mylist9.html |sed -e '<a href="' >mylist13.html
Thanks (13 Replies)
Discussion started by: kev_1234
13 Replies
6. Shell Programming and Scripting
hi all,
for an example :
df -k output shows:
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p6 3099260 1117760 1824068 8% /
/dev/cciss/c0d0p1 256666 18065 225349 8% /boot
none 8219180 0 8219180 0% /dev/shm
/dev/mapper/vglocal-home
1032088 245172 734488 26%... (7 Replies)
Discussion started by: raghur77
7 Replies
7. Shell Programming and Scripting
Hi,
In one of my scripts, I am using sed to do an expression replacement. The code in the script is as under
sed "s|MY_INP_Lab=""|MY_INP_Lab="${2}"|" file1, where $2=xyz_abc_mbk
The EXPECTED output is in file1, all the instances ofMY_INP_Lab="" shall be replaced by... (2 Replies)
Discussion started by: vivekmattar
2 Replies
8. Shell Programming and Scripting
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.
i tired using Ip at the end in the below command. but in ksh it is not working.
sed -n "/$variable/,/constant/p" file
i also... (11 Replies)
Discussion started by: johnjs
11 Replies
9. Shell Programming and Scripting
I need help with sed and awk scripts to search for Symmetrix ID=000090009902 and then grep its child disk devices associated to the dead paths and display them only, so that those dead devices can be removed.
test01:/#powermt display dev=all
Pseudo name=hdiskpower0
Symmetrix ID=000090009902... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
10. Shell Programming and Scripting
I need to create a script to change a file depending of 3 conditions using a target as parameter...
first condition
<chamada>
<numeroTerminalOriginador>CALLER</numeroTerminalOriginador>
<imeiOriginador></imeiOriginador>
<cgiPrimeiraErbOriginador></cgiPrimeiraErbOriginador>... (2 Replies)
Discussion started by: poulis
2 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)