Sponsored Content
Top Forums Shell Programming and Scripting Shell script to input as if from command line to the java program Post 302676881 by shitson on Wednesday 25th of July 2012 08:47:00 AM
Old 07-25-2012
Need more details, could you please describe the steps you take?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

executing the su command from a java program.

Say in unix (AIX) m/c, I am logged in with s1 user and want to start process p1 with user credentials of s2. I can do manually in this way: #su - s2 #enter password for s2> somePassword $ p1 But all this I have to do through a java program. How to pass the password through program. One... (1 Reply)
Discussion started by: shailendrat
1 Replies

2. Shell Programming and Scripting

How can I send the input of a read line command through a shell script

Hi All, I wish to automate the unix command 'su' through a shell script. I would like to pass the content of a file as password to 'su' command. My script is as below, #! /bin/sh su userA while read line do rpm -ivh $line done < pwd.txt where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
6 Replies

3. Shell Programming and Scripting

Launching a C program that needs input from a shell script

hi there, i need some help, i am trying to run a script to launch a C program and a Java program but before running both I want to get a user input and then invoke both programs with input received. In the programs the inputs are not command line arguments. This is the code, after the java... (4 Replies)
Discussion started by: momal
4 Replies

4. UNIX for Dummies Questions & Answers

Bash script to delete file input on command line

1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes? 2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
1 Replies

5. UNIX for Dummies Questions & Answers

how to pass input from c program to shell script?

Hello.. I am developing a Graphical User Interface using GTK. As part of our project I need to take inputs from GTK entries and pass those inputs to shell script and use them in shell script. The problem which struck me is only limited number of inputs are getting passed to shell script. For now... (14 Replies)
Discussion started by: kalyanilinux
14 Replies

6. Shell Programming and Scripting

how to execute a unix shell script from a java program

Hi All, well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this... Please see the below details...and read the details carefully. I have written some code, logic is 1)from... (4 Replies)
Discussion started by: aish11
4 Replies

7. Shell Programming and Scripting

Problem while Invoke Shell Script function from Java Program

Hi, I have create a Shell Script, with one function. I want to call the script file in Java Program. It working fine. but the problem is the function in the Shell Script is not executed. Please suggest me, Regards, Nanthagopal A (2 Replies)
Discussion started by: nanthagopal
2 Replies

8. Shell Programming and Scripting

Read input file with in awk script not through command line

Hi All, Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab. Cat my.awk #!/bin/awk -f function test(var){ some code} { } END { print"test code" } (5 Replies)
Discussion started by: random_thoughts
5 Replies

9. Shell Programming and Scripting

Script to read command line input and change it to some form

Hi, I want to write a small code in which script changes command line input to some form. Example script.sh a1 a2 a3 a4 ..... output should be "a1|a2|a3|....." Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
2 Replies

10. Shell Programming and Scripting

Executing the shell script through java program

Hi Team, Can you pls advise in java how can we call a shell script, actly I have a shell script at the following location /opt/dd/ajh.sh now I can execute this script by opening the session through putty by entering the servers details and password and then navigating to the following... (2 Replies)
Discussion started by: punpun777777
2 Replies
QProgressBar(3qt)														 QProgressBar(3qt)

NAME
QProgressBar - Horizontal progress bar SYNOPSIS
#include <qprogressbar.h> Inherits QFrame. Public Members QProgressBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) QProgressBar ( int totalSteps, QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) int totalSteps () const int progress () const const QString & progressString () const void setCenterIndicator ( bool on ) bool centerIndicator () const void setIndicatorFollowsStyle ( bool ) bool indicatorFollowsStyle () const bool percentageVisible () const void setPercentageVisible ( bool ) Public Slots void reset () virtual void setTotalSteps ( int totalSteps ) virtual void setProgress ( int progress ) void setProgress ( int progress, int totalSteps ) Properties bool centerIndicator - whether the indicator string should be centered bool indicatorFollowsStyle - whether the display of the indicator string should follow the GUI style bool percentageVisible - whether the current progress value is displayed int progress - the current amount of progress QString progressString - the amount of progress as a string (read only) int totalSteps - the total number of steps Protected Members virtual bool setIndicator ( QString & indicator, int progress, int totalSteps ) DESCRIPTION
The QProgressBar widget provides a horizontal progress bar. A progress bar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running. The progress bar uses the concept of steps; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps in the constructor or later with setTotalSteps(). The current number of steps is set with setProgress(). The progress bar can be rewound to the beginning with reset(). If the total is given as 0 the progress bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QHttp to download items when they are unable to determine the size of the item being downloaded. See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets. [Image Omitted] [Image Omitted] See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets. MEMBER FUNCTION DOCUMENTATION
QProgressBar::QProgressBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) Constructs a progress bar. The total number of steps is set to 100 by default. The parent, name and widget flags, f, are passed on to the QFrame::QFrame() constructor. See also totalSteps. QProgressBar::QProgressBar ( int totalSteps, QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) Constructs a progress bar. The totalSteps is the total number of steps that need to be completed for the operation which this progress bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0); call setProgress(50) after examining the last file. The parent, name and widget flags, f, are passed to the QFrame::QFrame() constructor. See also totalSteps and progress. bool QProgressBar::centerIndicator () const Returns TRUE if the indicator string should be centered; otherwise returns FALSE. See the "centerIndicator" property for details. bool QProgressBar::indicatorFollowsStyle () const Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. See the "indicatorFollowsStyle" property for details. bool QProgressBar::percentageVisible () const Returns TRUE if the current progress value is displayed; otherwise returns FALSE. See the "percentageVisible" property for details. int QProgressBar::progress () const Returns the current amount of progress. See the "progress" property for details. const QString &; QProgressBar::progressString () const Returns the amount of progress as a string. See the "progressString" property for details. void QProgressBar::reset () [slot] Reset the progress bar. The progress bar "rewinds" and shows no progress. Examples: void QProgressBar::setCenterIndicator ( bool on ) Sets whether the indicator string should be centered to on. See the "centerIndicator" property for details. bool QProgressBar::setIndicator ( QString & indicator, int progress, int totalSteps ) [virtual protected] This method is called to generate the text displayed in the center (or in some styles, to the left) of the progress bar. The progress may be negative, indicating that the progress bar is in the "reset" state before any progress is set. The default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the progress and totalSteps. You can set the indicator text if you wish. To allow efficient repainting of the progress bar, this method should return FALSE if the string is unchanged from the last call to this function. void QProgressBar::setIndicatorFollowsStyle ( bool ) Sets whether the display of the indicator string should follow the GUI style. See the "indicatorFollowsStyle" property for details. void QProgressBar::setPercentageVisible ( bool ) Sets whether the current progress value is displayed. See the "percentageVisible" property for details. void QProgressBar::setProgress ( int progress ) [virtual slot] Sets the current amount of progress to progress. See the "progress" property for details. void QProgressBar::setProgress ( int progress, int totalSteps ) [slot] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Sets the amount of progress to progress and the total number of steps to totalSteps. See also totalSteps. void QProgressBar::setTotalSteps ( int totalSteps ) [virtual slot] Sets the total number of steps to totalSteps. See the "totalSteps" property for details. int QProgressBar::totalSteps () const Returns the total number of steps. See the "totalSteps" property for details. Property Documentation bool centerIndicator This property holds whether the indicator string should be centered. Changing this property sets QProgressBar::indicatorFollowsStyle to FALSE. The default is TRUE. Set this property's value with setCenterIndicator() and get this property's value with centerIndicator(). bool indicatorFollowsStyle This property holds whether the display of the indicator string should follow the GUI style. The default is TRUE. See also centerIndicator. Set this property's value with setIndicatorFollowsStyle() and get this property's value with indicatorFollowsStyle(). bool percentageVisible This property holds whether the current progress value is displayed. The default is TRUE. See also centerIndicator and indicatorFollowsStyle. Set this property's value with setPercentageVisible() and get this property's value with percentageVisible(). int progress This property holds the current amount of progress. This property is -1 if progress counting has not started. Set this property's value with setProgress() and get this property's value with progress(). QString progressString This property holds the amount of progress as a string. This property is QString::null if progress counting has not started. Get this property's value with progressString(). int totalSteps This property holds the total number of steps. If totalSteps is 0, the progress bar will display a busy indicator. See also Set this property's value with setTotalSteps() and get this property's value with totalSteps(). SEE ALSO
http://doc.trolltech.com/qprogressbar.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qprogressbar.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QProgressBar(3qt)
All times are GMT -4. The time now is 10:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy