Sponsored Content
Top Forums Shell Programming and Scripting If condition after raw input in python Post 302970261 by ctrld on Monday 4th of April 2016 01:12:23 PM
Old 04-04-2016
Sweet!! I thought about an exit function but it was not this neat.. this is cool..
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk to print on condition in input file

I need only those records which has $2 equal to "DEF" independent of case (i.e upper or lower) nawk -F"," '$2 ~ //{print $0}' file This returns 3rd record also which i dont want I tried this but this doesnt work as expected. nawk -F"," '$2 == ""{print $0}' file i dont... (3 Replies)
Discussion started by: pinnacle
3 Replies

2. Shell Programming and Scripting

Copy input file based on condition

Hi, I am new to unix shell programming. I want to write a shell script for a functionality existing in mainframe system. I have one file as below as input 123456 &__987 &12yuq abcdef _ referes to blank condition:whenever the input file is having &__ ,it should be replaced... (4 Replies)
Discussion started by: charan0703
4 Replies

3. Shell Programming and Scripting

Change in Input feed based on condition file

Sorry Guys for not being able to explain in one of my earlier post. I am now putting my requirement with the input file and desired output file. In the below input file - Transaction code is at position 31:40. Business code is from position 318:321 TSCM00000005837 ... (7 Replies)
Discussion started by: varunrbs
7 Replies

4. Shell Programming and Scripting

Move input file based on condition

Hello, I have File1 in a directory A, a File2 in a directory B. If the File2 is not empty Then I have to move File1 from directory A to a directory archive Else no action. Is it possible to do this from one command line? Thank you in advance for your answers. Madi (2 Replies)
Discussion started by: AngelMady
2 Replies

5. Shell Programming and Scripting

Reducing the decimal points of numbers (3d coordinates) in a file; how to input data to e.g. Python

I have a file full of coordinates of the form: 37.68899917602539 58.07500076293945 57.79100036621094 The numbers don't always have the same number of decimal points. I need to reduce the decimal points of all the numbers (there are 128 rows of 3 numbers) to 2. I have tried to do this... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies

6. Shell Programming and Scripting

Kbd input processing with python

Hi, I'm new to python, and I work on a little program fpr my rapsberry pi. This scenario here is a little Midi sysex app for my Roland D-50 Synthesizer. With an usb attached number keypad I can type numbers from 0 to 9 and the referenced Midi sysex file would be send out to my Roland D-50... (1 Reply)
Discussion started by: sdohn
1 Replies

7. Shell Programming and Scripting

Python problem with input

Hello everyone, I have just started python, and there is something that escapes me. I don't understand why my little script doesn't work. When I do, it work: my_string = "bonjour" if len(my_string) < "6": print(my_string + " < 6") else: print(my_string + " > 6") ... (2 Replies)
Discussion started by: Arnaudh78
2 Replies

8. UNIX for Beginners Questions & Answers

awk to add +1 to value based on condition in input

In the awk below I am trying to add a | that will adjust $2 in the ouput by adding +1 if the original value from file that was used in $3 had a - in it. Line 3 of file is an example of this. In my current awk I just subtract one but I am not sure how to only apply this to those values without a -.... (5 Replies)
Discussion started by: cmccabe
5 Replies
DBIx::Class::CDBICompat(3)				User Contributed Perl Documentation				DBIx::Class::CDBICompat(3)

NAME
DBIx::Class::CDBICompat - Class::DBI Compatibility layer. SYNOPSIS
package My::CDBI; use base qw/DBIx::Class::CDBICompat/; ...continue as Class::DBI... DESCRIPTION
DBIx::Class features a fully featured compatibility layer with Class::DBI and some common plugins to ease transition for existing CDBI users. This is not a wrapper or subclass of DBIx::Class but rather a series of plugins. The result being that even though you're using the Class::DBI emulation layer you are still getting DBIx::Class objects. You can use all DBIx::Class features and methods via CDBICompat. This allows you to take advantage of DBIx::Class features without having to rewrite your CDBI code. Plugins CDBICompat is good enough that many CDBI plugins will work with CDBICompat, but many of the plugin features are better done with DBIx::Class methods. Class::DBI::AbstractSearch "search_where()" is fully emulated using DBIC's search. Aside from emulation there's no reason to use "search_where()". Class::DBI::Plugin::NoCache "nocache" is fully emulated. Class::DBI::Sweet The features of CDBI::Sweet are better done using DBIC methods which are almost exactly the same. It even uses Data::Page. Class::DBI::Plugin::DeepAbstractSearch This plugin will work, but it is more efficiently done using DBIC's native search facilities. The major difference is that DBIC will not infer the join for you, you have to tell it the join tables. Choosing Features In fact, this class is just a recipe containing all the features emulated. If you like, you can choose which features to emulate by building your own class and loading it like this: package My::DB; __PACKAGE__->load_own_components(qw/CDBICompat/); this will automatically load the features included in My::DB::CDBICompat, provided it looks something like this: package My::DB::CDBICompat; __PACKAGE__->load_components(qw/ CDBICompat::ColumnGroups CDBICompat::Retrieve CDBICompat::HasA CDBICompat::HasMany CDBICompat::MightHave /); LIMITATIONS
Unimplemented The following methods and classes are not emulated, maybe in the future. Class::DBI::Query Deprecated in Class::DBI. Class::DBI::Column Not documented in Class::DBI. CDBICompat's columns() returns a plain string, not an object. data_type() Undocumented CDBI method. Limited Support The following elements of Class::DBI have limited support. Class::DBI::Relationship The semi-documented Class::DBI::Relationship objects returned by "meta_info($type, $col)" are mostly emulated except for their "args" method. Relationships Relationships between tables (has_a, has_many...) must be declared after all tables in the relationship have been declared. Thus the usual CDBI idiom of declaring columns and relationships for each class together will not work. They must instead be done like so: package Foo; use base qw(Class::DBI); Foo->table("foo"); Foo->columns( All => qw(this that bar) ); package Bar; use base qw(Class::DBI); Bar->table("bar"); Bar->columns( All => qw(up down) ); # Now that Foo and Bar are declared it is safe to declare a # relationship between them Foo->has_a( bar => "Bar" ); AUTHOR AND CONTRIBUTORS
See AUTHOR and CONTRIBUTORS in DBIx::Class LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-12-16 DBIx::Class::CDBICompat(3)
All times are GMT -4. The time now is 08:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy