Sponsored Content
Top Forums Shell Programming and Scripting How to execute a command on each line of output from another command? Post 302966293 by RudiC on Wednesday 10th of February 2016 01:11:31 PM
Old 02-10-2016
Up at the top right of the thread there's an "Edit Tags" link. Click and enter "solved".
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute command created from sql output

Hi, I've would like to create kill statement from sqlplus output. So, I've modified somoene's script : mud_kill_stmt=`sqlplus -s / as sysdba <<EOF select 'kill -9 ' || p.SPID || ';' statement from $process_view p, $session_ ......... and so on exit; EOF` $mud_kill_stmt | tr ... (1 Reply)
Discussion started by: Arkadiusz Masny
1 Replies

2. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

3. Shell Programming and Scripting

How to take input from the user from the command line and execute commands basedon that?

Hi, I am using solaris 10 and bash shell.Script execution follows below.Initially it will check whether a directory exists or not if does not exist it will create it.(This I have completed) Second step:I have four users say user1,user2,user3,user4.Script should prompt for the user id and... (11 Replies)
Discussion started by: muraliinfy04
11 Replies

4. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

5. Shell Programming and Scripting

Read line by line and execute command

Hi ALL, I have a requirement like this. 1.GET ALL TABLE NAME (just table name) keep in file 2.Read line by line and get the count of table from tablename files. tablename detail has a sql statement "db2 select tabname from syscat.tables" (1 Reply)
Discussion started by: netdbaind
1 Replies

6. Shell Programming and Scripting

How to execute command remotely as sudo and save the output locally?

Hello , I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file. The below command asked for password , ran successfully and showed Output on my local server screen ... (2 Replies)
Discussion started by: rahul2662
2 Replies

7. Shell Programming and Scripting

sed working on command line but file unchanged when execute with Shell script

I have a simple task to replace unix line feed end of line characters with carriage returns. When I run the following “change file in place” sed instruction from the command line all the Line feeds are successfully replaced with Carriage returns. sed -i 's/$/\r/' lf_file.txt But that same... (1 Reply)
Discussion started by: hawkman2k
1 Replies

8. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies

9. UNIX for Beginners Questions & Answers

One Line Command how to use pipe statements to execute and comment on multiple possible outcomes

Hello Forum, I'm looking to expand the following command: INACTIVE_KERNELS=$(python -mplatform | grep -qi red && rpm -qa | grep '^kernel-' |grep -vE `uname -r` | paste -sd \; || echo "Not Red Hat Server") Currently this command will check if my server is RedHat server using the grep -qi... (6 Replies)
Discussion started by: greavette
6 Replies

10. UNIX for Beginners Questions & Answers

Search a multi-line shell command output and execute logic based on result

The following is a multi-line shell command example: $cargo build Compiling prawn v0.1.0 (/Users/ag/rust/prawn) error: failed to resolve: could not find `setup_panix` in `human_panic` --> src/main.rs:14:22 | 14 | human_panic::setup_panix!(); | ... (2 Replies)
Discussion started by: yogi
2 Replies
animate(1gv)							  Geomview Module						      animate(1gv)

NAME
animate - animate a sequence of geomview files SYNOPSIS
animate [-p] [-b] [-s speed] [-o] [-S script] [-hide] [-f file1 file2 ...] DESCRIPTION
Animate is an interactive animation tool specifically designed to be used with Geomview. It provides several simple animation controls such as looping, bouncing, and single frame stepping, as well as adjustable speed playing. The program works by telling geomview to read in a sequence of geomview files and then telling geomview to display each frame of the sequence in order. There are two methods that Animate provides for specifying which frames one wants to have in the sequence being viewed. The first method is to enter the name of every frame into the text input box and press return or click on load. The name of each frame must correspond with the name of a geomview file existing in the file system. EXAMPLES pict1 pict2 pict3 pict4 pict* pic?? The second method of loading frames is to first create an animation script file outside of animate and then load the script in by typing its name in the input box and clicking on the script button. The advantage of this method is that you can more easily specify the exact order in which you want the frames to be shown. The format of the script file is a list of frame names each followed by a newline. Comments prepended by a # sign are allowed. EXAMPLE SCRIPT FILE # list of frames for # my rotating cube movie cube.02 cube.04 cube.03 # get rid of this frame later cube.01 . . . cube.90 Loading frames into memory may take a little time, especially if each frame is a particularly large file. Be sure the machine you're using has sufficient memory to load all the frames you desire. Once all frames have been loaded, an 'animate' object will appear in the geomview object browser. It is now possible to begin animating. Scrolling through frames can be accomplished in several different ways. The first, and most obvious way is by 'playing' the frames. Click- ing on the Play button causes animate to begin playing through the frames in order, starting with the first frame or whichever frame has been selected. The corresponding name of each frame being shown is shown in the pink text-entry box. Click on Stop to cease playing. Animation speed depends on the size and complexity of the object in each frame. Thus different sequences can have considerably different top playing speeds. Use the Speed slider to set an upper limit to the animation rate. You can also play slowly through the frames can also by clicking repeatedly on either step button. Press the Bounce button to enter bounce mode. While in bounce mode, direction of play reverses whenever the first or last frame is reached. Clicking on either Step button determines the playing direction. Clicking on Once puts animate in 'once' mode. While in this mode, upon reaching the first or last frame (depending on which direction you are going) of a specified sequence, animate will stop playing. Normal playing can be resumed by clicking on Once again to exit this mode. The Info button will bring up a short menu containing helpful hints for program usage. Clicking on the exit button will cause the program to exit. OPTIONS
-p Start playing through the frames right away upon startup. -b Go into bounce mode upon startup. -s speed Set the speed of play upon startup. The value of speed may be an integer between 0 and 100 which roughly signifies the percentage of top playing speed. -o Set animation to play through only once upon startup. -S script Specify name of script containing filenames for objects to be read in upon startup. Takes precedence over -f option if present. -hide Makes animate invisible upon startup. *Warning* all animate commands must be specified on the command line when this option is used since there is no way to access the main window. -f file1 file2 ... Specify names of files containing objects to be read in upon startup. BUGS
When loading sequences one after another, geomview will often not load a sequence on the first try. This can often be remedied by telling animate to load the sequence yet again. SEE ALSO
geomview(1) oogl(5) AUTHOR
Daeron Meyer The Geometry Center December 12, 1994 animate(1gv)
All times are GMT -4. The time now is 10:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy