11-06-2009
But the output looks like
% sh x.sh
-n "config file=
-n T1.cfg,
-n T2.cfg,
-n T3.cfg,
-n T4.cfg,
-n T5.cfg,
"
I want something like
% sh x.sh
"config file= T1.cfg,T2.cfg,T3.cfg,T4.cfg,T5.cfg"
i tried to do something like we used to do in normal programming languages " a = a + $i.cfg", but looks not working.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to write an expect script for remote server login. At some point of time I need to telnet based on the output of grep command. Based on the output I need to select the ip address of the server. How can I write an expect script for the same. The output of the grep command is as follows:... (1 Reply)
Discussion started by: ayyappakumar
1 Replies
2. Shell Programming and Scripting
Hi all, First post so go easy guys.......
I've seen this asked before on some other forums but never properly/fully answered.
My problem involves the automation of an SFTP script sending from F-Secure (ssh2) HP-UX, to Windows FTP server (ssh2) running VShell. We've set up SSH keys but while... (8 Replies)
Discussion started by: b0bbins
8 Replies
3. Shell Programming and Scripting
When i execute rm -f $1 via a script file named rmf, it is not deleting all the files, say starting with "sec". i have execute rmf for many times to remove all the occurrences...
$rmf sec* - this should delete all files starting with sec, but not.
The rm -f sec* is working fine. kindly help... (3 Replies)
Discussion started by: frozensmilz
3 Replies
4. UNIX Desktop Questions & Answers
I would appreciate any help (sed / awk / perl) on the following question. I have the file in the following format. Note that the records are separated by the line that starts with the word "TRACE".I want the 5th and 6th values on the line starting with "TRACE" to be repeated down the file until the... (3 Replies)
Discussion started by: digipak
3 Replies
5. Shell Programming and Scripting
Hi,
I am new to Unix shell scripting.I have a requirement where I have to search for a particular file in a Unix directory based on some criterian of the content of the file.Actually there would be two files with same name and then I have zip them together and stoe in the same directory.
As... (1 Reply)
Discussion started by: Kunal Banerjee
1 Replies
6. Shell Programming and Scripting
Hi , I need little help regarding my script.
I have a file called abc which looks below.
Rohan 12
Rakesh 23
Ajay 25
Another file looks like this (xyz).
Mumbai
Delhi
Madras
How would i add column mentioned in second file so that the file looks as below.
Rohan 12 Mumbai... (2 Replies)
Discussion started by: pinga123
2 Replies
7. Shell Programming and Scripting
Hi experts,
I have two values in the file :
For example :
partcamt = 72.90
partdamt=27.9
I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is :
total value= 0072000027900
Currently I am using the following code :
... (3 Replies)
Discussion started by: nua7
3 Replies
8. Shell Programming and Scripting
Iam new to shell scripting,i have a text file in my $home directory mentioned below.
201249_BAN_EXCL.TXT
I need to refer the above file in my automated script but the number 201249 used to change every week.How can i refer to this file everyt time without renaming it manually?
Thanks in... (7 Replies)
Discussion started by: Jroyal
7 Replies
9. Shell Programming and Scripting
I have a shell script which calls a sql script.
But in the output file I'm getting an additional '^L' character.
Please advise how this is to be handled.
spool /opt/oracle/DART/out/Indx_rebuild.out
SET SERVEROUTPUT ON
SET VERIFY OFF
SET HEADING OFF
SET NEWPAGE NONE
SELECT 'ALTER INDEX '||... (2 Replies)
Discussion started by: narayanv
2 Replies
10. Shell Programming and Scripting
i have a o/p from find command that needs to be formatted
currently when i'm running
find . -name "v.info"
it is giving below o/p
/o/a/b/c/v.info
/o/a/b/c/d/v.info
/o/aa/bb/cc/v.info
/o/aa/bb/cc/dd/v.info
my requirement is if v.info is coming under sub-directories it shul be... (15 Replies)
Discussion started by: nikhil jain
15 Replies
LEARN ABOUT MOJAVE
jrunscript
jrunscript(1) General Commands Manual jrunscript(1)
NAME
jrunscript - command line script shell
SYNOPSIS
jrunscript [ options ] [ arguments... ]
PARAMETERS
options
Options, if used, should follow immediately after the command name.
arguments
Arguments, if used, should follow immediately after options or command name.
DESCRIPTION
jrunscript is a command line script shell. jrunscript supports both an interactive (read-eval-print) mode and a batch (-f option) mode of
script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the -l option can be
used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming"
style.
NOTE: This tool is experimental and may not be available in future versions of the JDK.
OPTIONS
-classpath path
Specify where to find the user's .class files that are accessed by the script.
-cp path
This is a synonym for -classpath path
-Dname=value
Set a Java system property.
-Jflag
Pass flag directly to the Java virtual machine on which jrunscript is run.
-l language
Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to spec-
ify the corresponding script engine's jar file using -cp or -classpath option.
-e script
Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line.
-encoding encoding
Specify the character encoding used while reading script files.
-f script-file
Evaluate the given script file (batch mode).
-f -
Read and evaluate a script from standard input (interactive mode).
-help
Output help message and exit.
-?
Output help message and exit.
-q
List all script engines available and exit.
ARGUMENTS
If [arguments...] are present and if no -e or -f option is used, then the first argument is the script file and the rest of the arguments,
if any, are passed as script arguments. If [arguments..] and -e or -f option are used, then all [arguments..] are passed as script argu-
ments. If [arguments..], -e and -f are missing, interactive mode is used. Script arguments are available to a script in an engine variable
named "arguments" of type String array.
EXAMPLES
Executing inline scripts
jrunscript -e "print('hello world')"
jrunscript -e "cat('http://java.sun.com')"
Use specified language and evaluate given script file
jrunscript -l js -f test.js
Interactive mode
jrunscript
js>print('hello world');
hello world
js>34 + 55
89
js> thread(function() { print('hello world'); }
hello world
js>
Run script file with script arguments
jrunscript test.js arg1 arg2 arg3
test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "argu-
ments" array.
SEE ALSO
If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built-in functions and objects. These
JavaScript built-ins are documented in jsdocs.
06 Aug 2006 jrunscript(1)