Sponsored Content
Top Forums Shell Programming and Scripting How to create CRUD Shell Script #Help? Post 303005335 by rbatte1 on Tuesday 17th of October 2017 07:17:51 AM
Old 10-17-2017
I can't even see the code, so I'm completely blind and unable to help.

Please paste it into the thread using CODE tags:



Thanks, in advance,
Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create a shell script

create a shell script that process a file file contain f2f_100.txt 1234 kkk 12345 f2f_101.txt 1234 mmm 11111 retire_200.txt 2222 rrr 22222 retire_201.txt 1112 qqr 12122 output needed if first field is f2f then new file fb_$1 contain $2|$4 ... (3 Replies)
Discussion started by: maykap100
3 Replies

2. Shell Programming and Scripting

shell script to create dirs

hi, I would like to know of a shell script to create the following A script which will take in two parameters i.e. name of file and SID and create directories named /opt/oracle/admin/$SID/{bdump,cdump,udump}. Then edit the init file and change the three lines that look like this. ... (2 Replies)
Discussion started by: sjajimi
2 Replies

3. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

4. Shell Programming and Scripting

Need help to create shell script.

When i run the following command it shows me following o/p # prtpicl -v -c temperature-sensor | sed -n '/T_TCORE/,/:name/ p' | grep Temperature 61 Temperature 62 i want to put this command in shell script so that when i run the script it says ********************* Proc1 ... (4 Replies)
Discussion started by: fugitive
4 Replies

5. Shell Programming and Scripting

Create helpmenu for shell script

Hello Community, I wrote a shell script, which (with some help of a few members of this forum:)) is doing what it should do... Now I think, it would be nice to tell the user of my little program, how he/she can use it. For this point, I created a help option, that can be called with "-h" after... (2 Replies)
Discussion started by: Sebi0815
2 Replies

6. Shell Programming and Scripting

To Create shell script files from a shell script

Dear Unix and Linux users, Good evening to all. I'm new to this community and thank you for having an wonderful forum. Dear members i had to create almost some 300 shell script files for a particular task. I tried something like this.... #!usr/bin/sh fname=epdb_jobs for x in `cat $fname`... (3 Replies)
Discussion started by: NehaB
3 Replies

7. Shell Programming and Scripting

Create DB table through shell script

Hi, Can anyone tell me that, How to create table in Oracle database through shell script(ksh). Table contains 3 fields, 1] Emp ID, String, primary key 2] Name, String 3] B Date, date. Thanks in advance. (6 Replies)
Discussion started by: Poonamol
6 Replies

8. Shell Programming and Scripting

Create Shell Script

Create a script to do the following : a. Poll for ctl file abc.ctl b. if the ctl file is found, then check for corresponding dat file(abc.dat) c. if dat file is not found then fail the process e. if dat file is found do file validation File Validation: a. Check the... (1 Reply)
Discussion started by: vivek1489
1 Replies

9. Shell Programming and Scripting

Need to create one batchfile using shell script

Hi, I want to create batch file using shell script. I am new to this world.Please help me to create batchfile. Batch file should contains following: Requirement is get the .zip file from the specified path and unzip the .zip file to some specified folder. This requirement I need to create... (1 Reply)
Discussion started by: santoshhegde
1 Replies

10. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
SDL::Tutorial::Images(3)				User Contributed Perl Documentation				  SDL::Tutorial::Images(3)

NAME
SDL::Tutorial::Images SYNOPSIS
# to read this tutorial $ perldoc SDL::Tutorial::Images # to create a demo animation program based on this tutorial $ perl -MSDL::Tutorial::Images=sdl_images.pl -e 1 ANIMATING IMAGES
Since you're already familiar with the concepts behind animation, it's time to learn how to work with images. As usual, the important point is that computer animation is just simulating motion by painting several slightly different frames to the screen every second. There are two ways to vary an image on screen. One is to change its coordinates so it's at a slightly different position. This is very easy to do; it's just like animating a rectangle. The other way is to change the image itself so it's slightly different. This is a little more difficult, as you'll need to draw the alternate image beforehand somehow. Loading Images As usual, start with an SDL::App object representing the image window. Then preload the image file. This is easy; just pass the "name" parameter to the SDL::Surface constructor: use SDL::Surface; my $frame = SDL::Surface->new( -name => 'frame1.png' ); Note: you'll need to have compiled SDL Perl (and probably SDL) to support JPEG and PNG files for this to work. That's it; now you have an SDL::Surface object containing the image. You can use the "height()", "width()", and "bpp()" methods to retrieve its height, width, and bits per pixel, if you need them. Displaying Images Drawing an image onto the screen requires blitting it from one surface to another. (Remember, "blitting" means copying bits in memory.) The "blit()" method of SDL::Surface objects comes in handy. Its arguments are a little odd, though. Assuming $app is the SDL::App object, as usual: use SDL::Rect; my $frame_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); my $dest_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); Here we have two SDL::Rect objects which represent rectangular regions of a Surface. $frame_rect represents the entire area of $frame, while $dest_rect represents the area of the main window in which to blit the frame. This may be clearer with more descriptive variable names: $source_surface->blit( $area_of_source_to_blit, $destination_surface, $destination_area ); As usual, call "update()" on $app to see the change. Requiring the source and destination Rect objects may seem tedious in this simple example, but it's highly useful for copying only part of surface to part of another. For example, animating this image is a matter of changing the "x" and "y" coordinates of $dest_rect: for my $x ( 1 .. 100 ) { $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Of course, you'll have to redraw all or part of the screen to avoid artifacts, as discussed in the previous tutorial. Multi-Image Animation That covers moving a single image around the screen. What if you want something more? For example, what if you want to animate a stick figure walking? You'll need several frames, just as in a flip-book. Each frame should be slightly different than the one before it. It's probably handy to encapsulate all of this in a "Walker" class: package Walker; use SDL::Surface; sub new { my ($class, @images) = @_; my $self = [ map { SDL::Surface->new( -name => $_ ) } @images ]; bless $self, $class; } sub next_frame { my $self = shift; my $frame = shift @$self; push @$self, $frame; return $frame; } To use this class, instantiate an object: my $walker = Walker->new( 'frame1.png', 'frame2.png', 'frame3.png' ); Then call "next_frame()" within the loop: for my $x ( 1 .. 100 ) { my $frame = $walker->next_frame(); $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Again, the rest of the frame drawing is missing from this example so as not to distract from this technique. You'll probably want to abstract the undrawing and redrawing into a separate subroutine so you don't have to worry about it every time. It'd be easy to make "next_frame()" much smarter, selecting an image appropriate to the direction of travel, using a bored animation when the character is no longer moving, or adding other characteristics to the character. As you can see, the hard part of this technique is generating the images beforehand. That can add up to a tremendous amount of art and that's one reason for the popularity of 3D models... but that's another tutorial much further down the road. More importantly, it's time to discuss how to make these animations run more smoothly. More on that next time. SEE ALSO
SDL::Tutorial basic SDL tutorial SDL::Tutorial::Animation non-image animation AUTHOR
chromatic, <chromatic@wgz.org> Written for and maintained by the Perl SDL project, <http://sdl.perl.org/>. BUGS
No known bugs. COPYRIGHT
Copyright (c) 2004, chromatic. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee. perl v5.12.1 2010-07-05 SDL::Tutorial::Images(3)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy