Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Invoque a program from a script. Post 2125 by mib on Sunday 22nd of April 2001 02:54:51 AM
Old 04-22-2001
#!/bin/sh

. path_to_another_script_name


if you are using c shell:
#!/bin/csh

source path_to_another_script_name


HTH
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

shell script program

shell script for sorting,searchingand insertion/deletion of elements in a list (1 Reply)
Discussion started by: jayaram_miryabb
1 Replies

2. Shell Programming and Scripting

Calling SHELL script from C program

Hi, I just tried to call a simple script from a pretty simple C program. I could not succeed :-( a message was thrown saying "sh: line 1: "Script name with path": Permission denied" The C program and shell script are below, both are in the same directory and shell script is given... (7 Replies)
Discussion started by: Chanakya.m
7 Replies

3. Shell Programming and Scripting

Need help on C-shell script program

#!/bin/csh # This program will add integers # # # add integer1 .. # # Check for argument if ($#argv == 0 ) then echo "usage: add integers" exit 1 else set input = $argv endif # set sum = 0 foreach var ( $input ) @sum = $sum + $input end # (1 Reply)
Discussion started by: haze21
1 Replies

4. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

5. UNIX for Dummies Questions & Answers

script/program in vi include $? or...

Hi. When you write a script/program in vi Do you include the $ Eg. #!/bin/bash $ echo "Today's date is `date`" or echo "Today's date is `date`" Make your script executable. $chmod +x script I included that. I keep getting a permission denied... why? Thanks! (5 Replies)
Discussion started by: JudoMan
5 Replies

6. UNIX for Advanced & Expert Users

Which script/shell/program launched a given script?

Dear gurus, I was wondering if anybody can help. Is it possible to distinguish whether a script was launched from a shell (interactively) or was called from another script? I basically need to do the following: if the script was run from the command line, I want to enable logging of the... (2 Replies)
Discussion started by: Snakeye
2 Replies

7. Shell Programming and Scripting

shell script program

shell script in Unix/Linux to find the lines numbers of a text file are having word which is 5 to 10 characters long and having first letter as a capital letter. (3 Replies)
Discussion started by: usersnehal
3 Replies

8. Shell Programming and Scripting

Problem running a program/script in the background from a script

Hi all, I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies

9. Shell Programming and Scripting

How do you write this program/script?

I need help with the following. 1) Write a program in any language that takes a single integer array parameter and returns the decimal average of the input values. 2) Write a program, in any language, that prints the integers from 1 to 10, along with a cumulative sum of the integers printed... (1 Reply)
Discussion started by: sqa4life
1 Replies

10. Shell Programming and Scripting

Script program is not recognizing the -w

Sorry I put -r I ment to out -w but its not perform none of -w, -r, -x flags Using centos 6.4 #!/bin/bash echo -e "enter the name of file :\c" read file_name if then if then echo "Type some text date. Tp quit press crtl-" cat >> $file_name ... (2 Replies)
Discussion started by: zbest1966
2 Replies
resize(1X)							     MIT X11R4								resize(1X)

Name
       resize - utility to set TERMCAP and terminal settings to current window size

Syntax
       resize [-u] [-s [row col]]

Description
       The  uitility  prints  a  shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm window
       from which the command is run. For this output to take effect, resize must either be evaluated as part of the command  line  (usually  done
       with  a	shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the
       following alias could be defined in the user's .cshrc:

	   % alias rs 'set noglob; `eval resize`'

       After resizing the window, the user would type:

	   % rs

       Users of versions of the Bourne shell (usually known as /bin/sh) that do not have command functions will need to send the output to a  tem-
       porary file and the read it back in with the ``.'' command:

	   $ resize >/tmp/out
	   $ . /tmp/out

Options
       The following options may be used with resize:

       -u      This option indicates that Bourne shell commands should be generated even if the user's current shell is not /bin/sh.

       -c      This option indicates that C shell commands should be generated even if the user's current shell is not /bin/csh.

       -s [rows columns]
	       This option indicates that the Sun console escape sequences will be used instead of the special xterm escape code. If rows and col-
	       umns are given, resize will ask the xterm to resize itself. However, the window manager may choose to disallow the change.

Restrictions
       The -u or -c must appear to the left of -s if both are specified.

       There should be some global notion of display size; termcap and terminfo need to be rethought in the context of window systems.	(Fixed	in
       4.3BSD, and ULTRIX-32 1.2)

Files
       For the base termcap entry to modify.

       User's alias for the command.

See Also
       csh(1), tset(1), xterm(1X)

																	resize(1X)
All times are GMT -4. The time now is 07:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy