10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am having a script file where in getting input parameter as string. I need to assign the variable but not able to achieve
#!/bin/bash
input=$1
replace=string_$input_string2
echo $replace
I am getting but should get string_<input_value>_string2
string_ (1 Reply)
Discussion started by: rohit_shinez
1 Replies
2. UNIX for Beginners Questions & Answers
//file begin =====
//some code
task abcd_;
input x;
input y,z; //some comment
output w; //some comment
reg p;
integer q;
begin
//some code
end
endtask : abcd_
//some code
//file end =====
expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
3. Shell Programming and Scripting
In the bash below the out put of a process is written to input. What I am trying to do is read each line in the input and verify/check it for specific text (there are always 6 lines for each file and the specific text for each line is in the description). There will always be 6 lines in each... (5 Replies)
Discussion started by: cmccabe
5 Replies
4. Shell Programming and Scripting
I run the script with one parameter : myscript abc002
But I need my script to check the parameter in txt array first:
txt="abc001 abc002 abc004"
What's the best way to do it? I am using ksh.
#! /usr/bin/ksh
txt="abc001 abc002 abc004"
if ; then
echo " Your input is wrong,... (9 Replies)
Discussion started by: newoz
9 Replies
5. Shell Programming and Scripting
Hi all
i need to check that if user has passed any input parameter while executing he shell script like
./test1.sh -a"-v"
then do smothing
if user execute the script without giving input paramater then
./test1.sh
then do something
how can we check this input parameter (6 Replies)
Discussion started by: aishsimplesweet
6 Replies
6. Shell Programming and Scripting
I need to create a script that has a user enter a value. I want to verify that the value is either 1,2, or 3. If it is not then I want them to try entering it again. I am using a while loop to force them to retry.
I am able to test the input against 1,2, and 3, but when I test agains an... (4 Replies)
Discussion started by: spartiati
4 Replies
7. Shell Programming and Scripting
I have to write a script to verify input parameters;
say esr should be YES or NO other wise the script should print an error.
This is what i tried in my script but I get the following error
:
esr="YES"
if ; then
print " Error should specify esr options YES/NO"
else
esr =$esr
fi
... (2 Replies)
Discussion started by: ramky79
2 Replies
8. Shell Programming and Scripting
pdir=`pwd`
if ; then
echo current directory $pdir
ls -altr
echo
fi
for f in $*
do
# directory
if ; then
echo current directory $f
cd $f
ls -latr
echo
fi
# but you can test file/dir
# regular file only
if ; then
echo... (4 Replies)
Discussion started by: wtolentino
4 Replies
9. Shell Programming and Scripting
Hi,
My script takes in one input parameter($1-email id) on the command line...
The script contains something like this...
awk '$1 == 400' abc.log >def.log
mail -s subject $1 <def.log
abc.log looks something like this...
300 222 330 123 445
400 098 890 727 663
How do i make the... (3 Replies)
Discussion started by: wannalearn
3 Replies
10. Shell Programming and Scripting
Hi,
My script expects 2 inputs and one of them is supposed to be time, I would like to check if the given input is in validate format (i.e. 16:00), could anyone help me out here? thanks! (1 Reply)
Discussion started by: mpang_
1 Replies