10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Heays
So i have that script to which i'd like to pipe (rather than just regular arguments) some data from another virtual output command.
Simplified:
echo * | script.sh
When i know how many args i expect, i can handle this simple by:
&& \
read ONE TWO && \
set ONE TWO
echo "$1 : $2... (7 Replies)
Discussion started by: sea
7 Replies
2. Shell Programming and Scripting
hi Scripting experts, I am using case..esac in my script .. I have given 6 option..e.g. 1 2 3 4 5 and *, howerver my script works welll for 1st 4 options but for 5 it considers * and exists. Is there a maximum limit on number of options given for case ..esac? (1 Reply)
Discussion started by: sdgawande
1 Replies
3. Shell Programming and Scripting
I am developing a script. This script takes in one parameter which is the name of a file whose content is a list of names of some files. The script can check whether those files exist in current directory.
Here is my question:
If the number of provided parameters is less than one or one of the... (2 Replies)
Discussion started by: Ray Sun
2 Replies
4. Shell Programming and Scripting
I have the following proc.
proc get_add {arg1 arg2 arg3 arg4 arg 5 .. ... arg N }
{
}
i need to count the number of arguments and also i need those arguments stored in an array.
please help out
---------- Post updated at 06:33 PM ---------- Previous update was at 05:30 PM ----------
... (1 Reply)
Discussion started by: Syed Imran
1 Replies
5. Shell Programming and Scripting
I have one configuration file. The number of lines in the file will vary. I need to pass each line as a parameter to a shell script in a single shot.
Ex:
Suppose file contains:
ou=x,o=z
o=y
Suppose the shell script name is sample.sh. Then the script should be called like sample.sh ou=x.o=z... (6 Replies)
Discussion started by: saurabhkoar
6 Replies
6. Shell Programming and Scripting
I have a task. The scenario is like this. I have a operation program (OPR1) , whose function is to simply double the (single)value it receives as input.
I have to write a script to operate the OPR1 and save its output in a file.
Later, I have to modify the script so as to be able to operate ... (0 Replies)
Discussion started by: animesharma
0 Replies
7. Shell Programming and Scripting
Hi , this is homework .. I have to finish it tomorrow,
I did my best , but I found it so difficult .. Can You HELP Me ??!
Write a bash shell script filestatic. The script should examine the number files in directories given as arguments (parameters) to this script.
a. if one argument is... (1 Reply)
Discussion started by: abo-el-sos
1 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Your script must check for the correct number of arguments (one argument). If somebody tries to invoke the... (1 Reply)
Discussion started by: brooksie91
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
What is the maximum number of arguments that could be passed to zsh ?
To find out that I tried a simple script.
And the maximum number of arguments that could be passed turned out to be 23394
#! /bin/zsh
arg=1
i=1
subIndex=23000
while
do
arg=$arg" "$i
i=$(($i + 1))... (9 Replies)
Discussion started by: matrixmadhan
9 Replies
10. Shell Programming and Scripting
I am writing script in c shell and using this script to read the command line arguments, but it is not working. Pl. someone let me know what is the problem.
#!/bin/csh -f
if ($#argv <> 2) then
echo "you must give exactly two parameters"
else
set name1 = $argv
... (1 Reply)
Discussion started by: skumar11
1 Replies