Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Capturing Input Parameters on Shell Script Post 302367806 by Scott on Tuesday 3rd of November 2009 02:05:26 PM
Old 11-03-2009
Hi.

The shell is expanding /.../*.txt to all *.txt files and they become arguments to the script.

To stop that, you could use quotes around the argument that would otherwise be expanded:

Code:

sh sample_file.sh "/u02/app/ccalloc/dev/out/*.txt" /export/home/ccalftdv

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help capturing pipe to a file in shell script

The command: echo "this is some text" | shellscript abc def ghi My problem: How to capture "this is some text" so that I can process it, I.e. capture to a file. What I'm attemting to do is process the text echo'd into a file after writing the parameters passed first. No problem... (6 Replies)
Discussion started by: heinz
6 Replies

2. Shell Programming and Scripting

DB2 stored procedure (with input parameters) from script

I have a db2 stored procedure on my database which require 3 parameters, I have the following db2 command in a sql script CONNECT TO SAMPLE; CALL BACKUP(INPUT_1, INPUT_2, INPUT3); Usually, I would just invoke this sql script from my shell script like below db2 -tf... (1 Reply)
Discussion started by: mpang_
1 Replies

3. Shell Programming and Scripting

Capturing Sybase SP output in Shell Script

Greetings, I need to capture the output of a Sybase stored procedure, inside my shell script( k shell). Based on this output, I need to call another perl script, with input arguments as the result set of the procedure execution. I need to keep looping through and call the perl script, ... (2 Replies)
Discussion started by: rajpreetsidhu
2 Replies

4. UNIX for Dummies Questions & Answers

Problem with Input Parameters using Shell Script

i have this basic code that accepts for two input one for the source file and the other is for the target directory. basically it is a simple copy command. the problem is at the end of the execution the second parameter string was passed to first parameter and it displays a message like: cp:... (3 Replies)
Discussion started by: wtolentino
3 Replies

5. Shell Programming and Scripting

Capturing log of a shell script

Hi, I have a script which does multiple tasks in sequence. When i execute the script, it runs and displays lot of messages for each of the steps on the console. Is there any way I can capture those messages and store it for audit purposes ? Best Regards, bornon2303 (2 Replies)
Discussion started by: bornon2303
2 Replies

6. Shell Programming and Scripting

Help parsing job script input parameters

I have a job script that runs with input parms from the command line. job.sh -p parm1_parm2_parm3_parm4_file_1.dat The parms are separated by _ The last parm is a file name and can have an _ in the name. I currently use the following commands to extract the parms parm1=`eval echo... (3 Replies)
Discussion started by: jclanc8
3 Replies

7. Shell Programming and Scripting

Capturing script output and input to log

Hi Is there a way that I can capture a shell script (both output and input) to a log file where I can analyze it? Thanks (6 Replies)
Discussion started by: nimo
6 Replies

8. Shell Programming and Scripting

Capturing name of the user who is running a shell script

Hello All, I am writing a shell script which will run on build server where multiple users can login.These users can run this script at the same time. I want to capture the name of the user who ran the script for every instance.How can I do that ? Regards,... (1 Reply)
Discussion started by: anand.shah
1 Replies

9. Shell Programming and Scripting

Shell script for capturing FTP logs

I have a script #!/bin/bash HOST=ftp.example.com USER=ftpuser PASSWORD=P@ssw0rd ftp -inv $HOST <<EOF user $USER $PASSWORD cd /path/to/file mput *.html bye EOF the script executes sucessfully I need to capture the FTP logs to a logfile should contain FTP Login successful ... (1 Reply)
Discussion started by: rajeshas83
1 Replies
REPLAY(1)						User Contributed Perl Documentation						 REPLAY(1)

NAME
scriptreplay - play back typescripts, using timing information SYNOPSIS
scriptreplay timingfile [typescript [divisor]] DESCRIPTION
This program replays a typescript, using timing information to ensure that output happens at the same speed as it originally appeared when the script was recorded. The replay simply displays the information again; the programs that were run when the typescript was being recorded are not run again. Since the same information is simply being displayed, scriptreplay is only guaranteed to work properly if run on the same type of terminal the typescript was recorded on. Otherwise, any escape characters in the typescript may be interpreted differently by the terminal to which scriptreplay is sending its output. The timings information is what script(1) outputs to standard error if it is run with the -t parameter. By default, the typescript to display is assumed to be named "typescript", but other filenames may be specified, as the second parameter. If the third parameter is specified, it is used as a speed-up multiplier. For example, a speed-up of 2 makes scriptreplay go twice as fast and a speed-up of 0.1 makes it go ten times slower than the original session. EXAMPLE
% script -t 2> timingfile Script started, file is typescript % ls <etc, etc> % exit Script done, file is typescript % scriptreplay timingfile SEE ALSO
script(1) COPYRIGHT
Copyright (C) 2008 James Youngman Copyright (C) 2008 Karel Zak This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. Released under the GNU General Public License version 2 or later. AUTHOR
The original scriptreplay program was written by Joey Hess <joey@kitenet.net>. The program was re-written in C by James Youngman <jay@gnu.org> and Karel Zak <kzak@redhat.com>. AVAILABILITY
The scriptreplay command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. 3rd Berkeley Distribution perl v5.6.0 REPLAY(1)
All times are GMT -4. The time now is 10:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy