In the abov, how to match the blank space in the case structure ?
Means, if user simply enters <enter> without entering any value then it should also accept in the above case structure.
For number range [0-9]|[0-5][0-9] is used , but how to use blank space in the criteria ?
How it can be done ?
With Regards
Last edited by Scott; 10-04-2010 at 11:22 AM..
Reason: Code tags, please...
Hello,
I am having a problem setting a range of numbers for the "case" structure.
I can use with no problems, but
when I use it doesn't work???
Does the case struture allow numeric ranges?
eg:
echo -e "enter number between 0 and 60: \c"
read $answer
case $answer in
) echo... (2 Replies)
Hi all
Is it possible to copy a structure of a directory only.
e.g.
I have a file with the following entries that is a result of a find :-
/dir1/dir2/file.dbf
/dir1/dir2/dir3/file1.dbf
/dir1/file.dbf
I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Hi,
Can anyone help me with the following case structure?
echo "Please enter the date for which you want the Report:\c"
read dat
d1=`echo $dat|cut -c7-8`
m1=`echo $dat|cut -c5-6`
y1=`echo $dat|cut -c1-4`
yr=`expr "$d1" - 1`
case "$yr" in
0)
MONTH=`expr "$m1" - 1`... (4 Replies)
Hello Groups
I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records.
if we loop it in both the structures it is going to consume time.
I am looking for a simple... (3 Replies)
Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Hello Experts,
I ve been trying to build another shell where I am using the following code.
transact="tv5cpc1"
case "$transact" in
"...cp..")
xActType=""
;;
"...de..")
xActType="sp_dep"
;;
"...ep..")
xActType="sp_epa"
;;
"....v.")
... (4 Replies)
Hello Experts,
I was wondering how can we get a fall trough case structure.
Eg: If we have two cases A and B and a default; if I do not break after A, it should execute all the statements of A as well as B if I break after B else fall through even lower.
I tried this:
#!/bin/sh
v1=1... (6 Replies)
Hi guys,
I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.
I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Hi folks,
I am new to bash scripting so please excuse my question.
Is there any chance to combine a case structure with the read command?
Like
case (read -p "" variable) in
x)
Thx! (7 Replies)