Please provide information on your attempts to resolve.
Until so, we will refrain from sharing any guidance.
The purpose of this Board is the assist users in solving their problems. We are not a coding service. Further, we are not a homework service - and sometimes posts appear to be an attempt to have someone solve a school assignment.
Finally, we urge all members of the Forum to NOT post a solution to this question until effort to resolve is demonstrated.
This is what I have so far, and I am kind of doing manual coding every day for day1, day2, day3
But, I like to automate it so that I can eliminate manual coding. Thank you!
Everything my dear colleague RudiC said applies, but also, just to show you that posting your stuff is a rewarding activity:
Quote:
Originally Posted by danielshell
Under NO circumstances you should use backticks any more! If you are not the rare exception who uses an original Bourne shell from the time computers ran on steam instead of electrical power you have a shell that can (and should) use "POSIX style" subshells:
Quote:
Originally Posted by danielshell
The same applies here but in addition the grep can be straightened. The sort is superfluous because you want to know the number of lines at the end which is independent of the sorting:
Hello,
I have file (PARFILE) with string on first line:
INCLUDE=SCHEMA:"IN\( 'SCHEMA1','SCHEMA2','SCHEMA3' \)"In .sh script I use:
....
IMPORT_SCHEMA=`awk 'NR==1{print $2}' ${PARFILE}`
...print $2 is because 'SCHEMA1','SCHEMA2','SCHEMA3' is 2nd column in file
echo "$IMPORT_SCHEMA"... (5 Replies)
attempting the hangman program. This was an optional assignment from the professor. I have completed the logical coding, debugging now.
##I have an array $wordString that initializes to a string of dashes
##reflecting the number of letters in $theWord
##every time the user enters a (valid)... (5 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
For example
test.sh:
test="teststring"
cmd=$1
$cmd
For some reason I'm NOT seeing "teststring" when I type: ./test.sh "echo $test"
Any ideas on how to get around this?
I've tried commands like:
./test.sh "echo $($test)"
./test.sh "echo '$test'"
And many variations to no... (6 Replies)
Hi All,
I need to know how to derive the day of the week by passing the value in following format:
Feb 28 2010
The output I'm expecting is Sunday or Sun.
I know, I can use the following code to get the day of the week.
date +%a
But I want to pass the value as a string. Please help... (11 Replies)
I'm trying to create a bash script that takes a URL as one of its arguments like this:
./script.sh http://url.cfm?asdf&asdf=234
variable=$1
echo $variable
I'm having trouble storing the URL because it contains the meta character "&" which is being interpreted... thus when I run the... (4 Replies)
hi to all
code:
</div>
command... "command_name arg1 arg2 option=xxxxx"
example --- useradd username group=xxxxxx.
</div>
when someone ran this command it point to some other script (say script1), mean post execution of command.
in the script1 i need only "xxxxx" value. then i... (5 Replies)
HI all,
Very new to shell programming and just wanted some help on how to solve the following problem.
I have a small shell script which searches a given file and extracts some string parameters. I want to now be able to call this script from another shell script and somehow pass the parameters... (11 Replies)
Hi
I have a shell function which returns string(ksh). The string is an sql statement.
This statement can have '*' in its content (i.e. select 100 / 2 *100 from dual).
When this happens ret_str will have contents of current directry I run the script from build in sql. Is there any way to fix it... (2 Replies)
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (1 Reply)