Sponsored Content
Full Discussion: How can I automate a script?
Top Forums Shell Programming and Scripting How can I automate a script? Post 302332012 by sai21 on Wednesday 8th of July 2009 12:36:06 AM
Old 07-08-2009
Bug

Your question is not clear..
I think,this approach might help you. You can write a script which will keep on check whether any file opened thru vi. This can be checked thru ps command. If it is opened, then you need to take actions whatever you need.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

automate the input in a script

I have a program that i have to run by cron. The program needs user input. So i have to automate that in a littke script. start of script program.sh: result=program.log; export result echo Program starting : `date` >> $result /usr/local/program >> $result echo Program running : `date` >>... (11 Replies)
Discussion started by: erwinspeybroeck
11 Replies

2. Shell Programming and Scripting

here document to automate perl script that call script

I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript. here is my script $ cat test.sh #ksh for testcase do program <<-EOF | tee -a funcscnlog.log y... (3 Replies)
Discussion started by: hogger84
3 Replies

3. Shell Programming and Scripting

Script(s) to Automate Tasks

I know that this has a bad title, but I'm not sure how to sum it up well. (And I'm new to Linux in general, so please excuse any incorrect terminology :o) Anyway, I'm trying to create a script that gets whatever folder you're in, and then does a command with that directory as an argument. I... (2 Replies)
Discussion started by: droppedonjapan
2 Replies

4. UNIX for Advanced & Expert Users

Shell Script to Automate

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (1 Reply)
Discussion started by: sam786
1 Replies

5. Shell Programming and Scripting

Automate shell script

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (3 Replies)
Discussion started by: sam786
3 Replies

6. Shell Programming and Scripting

Automate Script ***V. Urgent

Hi All, ./procdure.ksh which opens the below the menu, I want to build a script which will press 4 and run the Sector Data Automatically (instead of pressing option 4 manually) Is there any way for this, please let me know... 1) FX Rates MDU 9) Fidessa Cash... (7 Replies)
Discussion started by: niceboykunal123
7 Replies

7. Shell Programming and Scripting

Looking for help with a script to automate VLC

Hi, New member here looking for help. This might not be a post for the 'VERY basics' section, so feel free to move it to somewhere more appropriate. I've created a script that searches my computer for video files, creates a list of these files, and selects a number of random entries to play in... (2 Replies)
Discussion started by: uncertain
2 Replies

8. Shell Programming and Scripting

mail script to automate

Hi, Here below the logs from the mail server: less /var/log/messages: Sep 6 04:03:31 server-59 out: 1252227811|webmaster@zilia.com|antonino.granata@gmail.com|2175|success|1 Sep 6 04:03:33 server-59 in: 1252227813|news@tarot.com|junk@thess.com|30376|success|1 Sep 6 04:03:35 server-59... (8 Replies)
Discussion started by: gsiva
8 Replies

9. Shell Programming and Scripting

Automate remote script

Hi all, I need to execute a script on a remote machine that are connected to the network.The basic requirement is to write a script which will login in remote machine and then execute the other script automatically placed in remote machine.So that I need to execute the remote machine script... (3 Replies)
Discussion started by: smartgupta
3 Replies

10. Windows & DOS: Issues & Discussions

automate the script

Dear all, I I want to login to my Linux machine using putty and then run some script from Windows machine.we can do it after loging it and then execute the script by typing it in putty command line screen. but I want to automate it.So whenever I will fire this script,it will do the following... (4 Replies)
Discussion started by: smartgupta
4 Replies
Standard Channels(3)					      Tcl Library Procedures					      Standard Channels(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_StandardChannels - How the Tcl library deals with the standard channels _________________________________________________________________ DESCRIPTION
This page explains the initialization and use of standard channels in the Tcl library. The term standard channels comes out of the Unix world and refers to the three channels automatically opened by the OS for each new appli- cation. They are stdin, stdout and stderr. The first is the standard input an application can read from, the other two refer to writable channels, one for regular output and the other for error messages. Tcl generalizes this concept in a cross-platform way and exposes standard channels to the script level. APPLICATION PROGRAMMING INTERFACES The public API procedures dealing directly with standard channels are Tcl_GetStdChannel and Tcl_SetStdChannel. Additional public APIs to consider are Tcl_RegisterChannel, Tcl_CreateChannel and Tcl_GetChannel. INITIALIZATION OF TCL STANDARD CHANNELS
Standard channels are initialized by the Tcl library in three cases: when explicitly requested, when implicitly required before returning channel information, or when implicitly required during registration of a new channel. These cases differ in how they handle unavailable platform- specific standard channels. (A channel is not "available" if it could not be successfully opened; for example, in a Tcl application run as a Windows NT service.) 1) A single standard channel is initialized when it is explicitly specified in a call to Tcl_SetStdChannel. The states of the other standard channels are unaffected. Missing platform-specific standard channels do not matter here. This approach is not available at the script level. 2) All uninitialized standard channels are initialized to platform-specific default values: (a) when open channels are listed with Tcl_GetChannelNames (or the file channels script command), or (b) when information about any standard channel is requested with a call to Tcl_GetStdChannel, or with a call to Tcl_GetChannel which specifies one of the standard names (stdin, stdout and stderr). In case of missing platform-specific standard channels, the Tcl standard channels are considered as initialized and then immediately closed. This means that the first three Tcl channels then opened by the application are designated as the Tcl standard channels. 3) All uninitialized standard channels are initialized to platform-specific default values when a user-requested channel is registered with Tcl_RegisterChannel. In case of unavailable platform-specific standard channels the channel whose creation caused the initialization of the Tcl standard chan- nels is made a normal channel. The next three Tcl channels opened by the application are designated as the Tcl standard channels. In other words, of the first four Tcl channels opened by the application the second to fourth are designated as the Tcl standard channels. RE-INITIALIZATION OF TCL STANDARD CHANNELS Once a Tcl standard channel is initialized through one of the methods above, closing this Tcl standard channel will cause the next call to Tcl_CreateChannel to make the new channel the new standard channel, too. If more than one Tcl standard channel was closed Tcl_CreateChannel will fill the empty slots in the order stdin, stdout and stderr. Tcl_CreateChannel will not try to reinitialize an empty slot if that slot was not initialized before. It is this behavior which enables an application to employ method 1 of initialization, i.e. to create and designate their own Tcl standard channels. SHELL-SPECIFIC DETAILS tclsh The Tcl shell (or rather the function Tcl_Main, which forms the core of the shell's implementation) uses method 2 to initialize the stan- dard channels. wish The windowing shell (or rather the function Tk_MainEx, which forms the core of the shell's implementation) uses method 1 to initialize the standard channels (See Tk_InitConsoleChannels) on non-Unix platforms. On Unix platforms, Tk_MainEx implicitly uses method 2 to initialize the standard channels. SEE ALSO
Tcl_CreateChannel(3), Tcl_RegisterChannel(3), Tcl_GetChannel(3), Tcl_GetStdChannel(3), Tcl_SetStdChannel(3), Tk_InitConsoleChannels(3), tclsh(1), wish(1), Tcl_Main(3), Tk_MainEx(3) KEYWORDS
standard channels Tcl 7.5 Standard Channels(3)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy