Hi Jim,
I have following script,i which i need to take dynamic value .
script,
In the above script i want to use INT_EUR as a variable that means i want to take variable from property file only but there are 8 different constants.
As you know i am using properties file now the problem is that my boss want to
pass the variable to script in such a way that the script should recognize the variable and act according to that.
e.g .properties file contains
Both below variable belongs to sourcesystem=INTELLECT and region=EUR
sourcesystem=OPICS and region=TOK
INT_EUR1=14
INT_EUR2=51
these belongs to sourcesystem=OPICS
INT_TOK1=14
INT_TOK2=57
and so on.
Now my problem is i want to pass only sourcesystem and region to script so that script will recognize sourcesystem and region and work or that file only.
example: script name e.g new.sh INTELLECT EUR1
then script will check INTELLECT EUR1 file and count ~ for that file only if count wrong then gives an error with line number.
Could you please solve this problem.
Thanks & Regards,
Ganesh,
Last edited by vbe; 10-08-2010 at 07:45 AM..
Reason: code tags
the above paths are given in which handoff are presents where each handoffs are two types like DEAL and CASHFLOW
so for DEAL for EUR 51 and for TOK 57 tilde counts and for cashflow 14 tilde counts .
now i want to pass parameter to script in such a way that it should take valuue of respective sourcesystem and region from property file and check whether count of each line is correct or not
OUTPUT required;
step 1:./scriptname param1 param2
e.g ./new.sh INTELLECT EUR
step2: at line 3 tild count is 15 so error in this line like that
--That means need to pass param1 as INTELLECT which is sourcesystem and param2 is EUR which region both are refers handoff location whos path is given in property file.
--handoff example i have given already.
--Could you please give right solution for it.
--at least give some idea about how to pass parameter to my script it would be helpfull for me.
Thanks & Regards,
Ganesh
---------- Post updated at 09:25 AM ---------- Previous update was at 09:22 AM ----------
Hi,
Handoff sample.
$profile is the path of data file like
Hi everyone, I'm new here and just a beginner in linux scripting.
Just want to ask for help on this one.
I am trying to create a script that will accept user input (year-month and user/s).
I wanted to have the script to continue running, until the user inputs a DATE and name/s of user/s. ... (2 Replies)
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if
then
echo " user requested to continue "
##some commands... (7 Replies)
this section of the awk code i have here takes file to work with from the user.
the user specifies the file name from the command line and the file name is assigned to the variable $FLIST
awk 'BEGIN {
while((getline < "'${FLIST}'")>0)
S
FS="\n"; RS="}\n"
}
now, i dont want... (5 Replies)
Hello
I am trying to create a user input shell scipt. The objective is user should enter the circuit number and the input is saved in a log file. If the user does not enter anything then the question should prompt it until the circuit no. is entered.
Can any one please correct the code below.... (3 Replies)
Hi,
I need to get the user input and execute a particular script based on the input provided.
For E.g. When I execute the script say Test.sh it should prompt "For which country I need to execute the script? (US/India)"
Based on the input as US or India from the user the execution of... (8 Replies)
I am trying to write a awk script that prompts user for input to set the FILENAME varable. I can get it set, but I think awk is not doing anything with it.
this is what I have so far
#!/usr/bin/nawk -f
BEGIN {
FILENAME = ""
printf "Enter name of file to check in : "
... (2 Replies)
Using the following I'm trying to print the user's response to the prompt Y / N but I get nothing other than the contents of $1?
awk '{
printf($1 " ? (Y/N)")
getline myresponse < "-"
system("read myresponse")
if (myresponse == "Y")
{ print $1... (17 Replies)