Sponsored Content
Top Forums Shell Programming and Scripting How to reuse values in Shell script Post 302702197 by SushilAnand on Tuesday 18th of September 2012 03:57:58 AM
Old 09-18-2012
Thanks for your prompt reply.

I am using AIX 6.1 and found that there is no option is working with read (either read -p or read -i).
Is there any other way I could accept the already entered value or enter new value.

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Returning Values (shell Script)

I have an application on Informix 4GL, and I am invoking the shell script from the program, but I need to know if the shell script work fine or not, in order to continue the process. I know that we can use $? to get the final status but this is on unix command. How can I return a value from the... (3 Replies)
Discussion started by: jennifer01
3 Replies

2. Shell Programming and Scripting

Values of value($$X) in unix shell script

Values of value of x ($$X) in unix shell script program ---------------- #!/bin/ksh t1='/CPI/nodeA/stubs/Test/T1' t2='/CPI/nodeA/stubs/Test/T2' cd $$1--> Parameter may me t1 or t2 ------------------- expecting cd $t1 shold go to the path but it is giving error. (5 Replies)
Discussion started by: ganesh_111
5 Replies

3. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

4. Shell Programming and Scripting

need help on shell script(to pass the values)

only the arguments that are written to the file, my script is (sh /u01app/wkf.sh"$start_no","$name","$Condition","$file_name") like that when ever I run my script I need to write into a new file every time, like wise I have upto10 files with different names.bec my $start_no and $name will... (1 Reply)
Discussion started by: sai123
1 Replies

5. Shell Programming and Scripting

How to get values from an excel in a shell script

Hi All, Am trying to write a shell script which will get values from an excel and do some calculations. Can any one pls help me out in the commands used to get the values from ms-excel. Thanks!!!:) (2 Replies)
Discussion started by: msri.1900
2 Replies

6. Shell Programming and Scripting

how to reuse a shell script to change env from perl

Hi: I am trying to reuse an existing shell script foo1.csh to set environment variables inside a perl script and its childern processes. Is it possible at all to make those environment variables persistent in the main perl process and its children processes? Do I have to create a new... (4 Replies)
Discussion started by: phil518
4 Replies

7. Shell Programming and Scripting

Shell script to sum every 3 values

I am looking for an easy way to calculate the sum of three values (*-12, *-01, *-02) which are contained after a comma (,). I have found an awk command that will sum every 3rd value, but I am not interested in the values before the comma (,). awk '{s+=$1}NR%3==0{print s;t+=s;s=0}'I am only... (8 Replies)
Discussion started by: ncwxpanther
8 Replies

8. Shell Programming and Scripting

Query the table and return values to shell script and search result values from another files.

Hi, I need a shell script, which would search the result values from another files. 1)execute " select column1 from table_name" query on the table. 2)Based on the result, need to be grep from .wft files. could please explain about this.Below is the way i am using. #!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

9. UNIX for Beginners Questions & Answers

How to pass values to a script called from within another script in shell?

Need ideas on how to achieve the below. We have a script say "profile.sh" which internally calls another existing script called "name.sh" which prompts for the name and age of a person upon execution. When i run profile.sh how can i populate a pre-defined value from another file and pass that... (1 Reply)
Discussion started by: sankasu
1 Replies

10. UNIX for Beginners Questions & Answers

How to pass values to a script called from within another script in shell?

Ceiling Light - The Forgotten Element One of the highest details concerning using an LED ceiling panel essentially offer a fantastic dance floor which definitely makes the customers dance right away.They are a quite low cost method of something like a lighting solution, simple collection up,... (1 Reply)
Discussion started by: harveyclayton
1 Replies
PTKSH(1p)						       perl/Tk Documentation							 PTKSH(1p)

NAME
ptksh - Perl/Tk script to provide a graphical user interface for testing Perl/Tk commands and scripts. SYNOPSIS
% ptksh ?scriptfile? ... version information ... ptksh> $b=$mw->Button(-text=>'Hi',-command=>sub{print 'Hi'}) ptksh> $b->pack ptksh> o $b ... list of options ... ptksh> help ... help information ... ptksh> exit % DESCRIPTION
ptksh is a perl/Tk shell to enter perl commands interactively. When one starts ptksh a MainWindow is automaticly created, along with a ptksh command window. One can access the main window by typing commands using the variable $mw at the 'ptksh> ' prompt of the command window. ptksh supports command line editing and history. Just type "<Up>" at the command prompt to see a history list. The last 50 commands entered are saved, then reloaded into history list the next time you start ptksh. ptksh supports some convenient commands for inspecting Tk widgets. See below. To exit ptksh use: "exit". ptksh is *not* a full symbolic debugger. To debug perl/Tk programs at a low level use the more powerful perl debugger. (Just enter ``O tk'' on debuggers command line to start the Tk eventloop.) FEATURES
History Press <Up> (the Up Arrow) in the perlwish window to obtain a gui-based history list. Press <Enter> on any history line to enter it into the perlwish window. Then hit return. So, for example, repeat last command is <Up><Enter><Enter>. You can quit the history window with <Escape>. NOTE: history is only saved if exit is "graceful" (i.e. by the "exit" command from the console or by quitting all main windows--NOT by interrupt). Debugging Support ptksh provides some convenience function to make browsing in perl/Tk widget easier: ?, or h displays a short help summary. d, or x ?args, ...? Dumps recursively arguments to stdout. (see Data::Dumper). You must have <Data::Dumper> installed to support this feature. x was introduced for perl debugger compatibility. p ?arg, ...? appends "| " to each of it's arguments and prints it. If value is undef, '(undef)' is printed to stdout. o $widget ?-option ...? prints the option(s) of $widget one on each line. If no options are given all options of the widget are listed. See Tk::options for more details on the format and contents of the returned list. o $widget /regexp/ Lists options of $widget matching the regular expression regexp. u ?class? If no argument is given it lists the modules loaded by the commands you executed or since the last time you called "u". If argument is the empty string lists all modules that are loaded by ptksh. If argument is a string, ``text'' it tries to do a ``use Tk::Text;''. Packages Ptksh compiles into package Tk::ptksh. Your code is eval'ed into package main. The coolness of this is that your eval code should not interfere with ptksh itself. Multiline Commands ptksh will accept multiline commands. Simply put a "" character immediately before the newline, and ptksh will continue your command onto the next line. Source File Support If you have a perl/Tk script that you want to do debugging on, try running the command ptksh> do 'myscript'; -- or (at shell command prompt) -- % ptksh myscript Then use the perl/Tk commands to try out different operations on your script. ENVIRONMENT
Looks for your .ptksh_history in the directory specified by the $HOME environment variable ($HOMEPATH on Win32 systems). FILES
.ptksh_init If found in current directory it is read in an evaluated after the mainwindow $mw is created. .ptksh_init can contain any valid perl code. ~/.ptksh_history Contains the last 50 lines entered in ptksh session(s). PITFALLS
It is best not to use "my" in the commands you type into ptksh. For example "my $v" will make $v local just to the command or commands entered until <Return> is pressed. For a related reason, there are no file-scopy "my" variables in the ptksh code itself (else the user might trounce on them by accident). BUGS
Tk::MainLoop function interactively entered or sourced in a init or script file will block ptksh. SEE ALSO
Tk perldebug VERSION
VERSION 2.03 AUTHORS
Mike Beller <beller@penvision.com>, Achim Bohnet <ach@mpe.mpg.de> Copyright (c) 1996 - 1998 Achim Bohnet and Mike Beller. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Tk804.03 2010-05-29 PTKSH(1p)
All times are GMT -4. The time now is 02:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy