03-20-2009
Thank you dariyoosh,
That works, somtimes the simpliest of stoff is overlooked.
The code now calls the other method (backup) but it does not wait for the user to enter anything
backup() {
echo "\nTest day not found, would you like to try again? [Y/N] : "
typeset -u pp # Changes the entered value to uppercase
read ans
pp=$ans
if ["$pp" = "Y"] ; then
main
elif ["$pp" = "N"] ; then
echo "\n ******** GOODBYE ************ \n"
else
echo "\nUnrecognised entry \n"
fi
}
9 More Discussions You Might Find Interesting
1. Linux
Hi ,
I am running this script ( pasting only error code ) to generate some ddl definition for tables . But what I want is to break out of the db2look part when the base_table is not like DIM_$TN or FACT_$TN . After this it should come back to while loop to read the next TN . I read the other... (3 Replies)
Discussion started by: capri_drm
3 Replies
2. Shell Programming and Scripting
My input file is like
USER_WORK.ABC
USER_WORK.DEF
I want output file like
ABC
DEF (4 Replies)
Discussion started by: scorp_rahul23
4 Replies
3. Shell Programming and Scripting
I have the following command in a Bash shell script:
who | grep -w $1 | some other commands
If grep fails, an error message is displayed. How do I test if grep fails and still be able to pipe it's output to the rest of the commands?
I have the following solution:
a=`who | grep -w $1`... (3 Replies)
Discussion started by: oinkl
3 Replies
4. Shell Programming and Scripting
Hi,
I have a file that looks like this - lets call it fileA
>hhm2
IIIIIIIIILLLLLLLMMMMMMMMMNNNNNNNNNNGGGGGGHHHHHHHH
>hhm4
OOOOOKKKKKKKKMMMMMHHHHHLLLLLLLLWWWWWWWWWWW
>hhm9
OOOOOOOIIIIIIIIIKKKKKKKKKMMMMMHHHHHHHHHHHLLLLLLLLLL
So the file is pretty straight forward. The name is indicated... (2 Replies)
Discussion started by: phil_heath
2 Replies
5. Shell Programming and Scripting
Dear Friends,
Here I need your guidance once again.
I have for loop which check all files in a folder for a particular string. If the string is found in a file it returns value other than 0 else returns 0 value in variable t2.
At times the string which we are looking for is in first file... (1 Reply)
Discussion started by: anushree.a
1 Replies
6. Shell Programming and Scripting
...when the lines use both a colon and commas to separate the parts you want read as information.
The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Discussion started by: SilversleevesX
2 Replies
7. Shell Programming and Scripting
Hello,
I hired a coder a couple weeks ago to develop 3 small modules for a popular CMS. I created Github repos for each module so as to manage the code and allow others to download it at will.
The CMS in question is structured in such a way that each module is housed in its own... (2 Replies)
Discussion started by: fern
2 Replies
8. Shell Programming and Scripting
i have a nested if statement. i need to check for a condition (highlighted in red below). if condition is true, i need the if statement to break out of the statement and then return to the if statement section i have highlighted in blue.
is this possible?
if ; then
#return here
... (6 Replies)
Discussion started by: SkySmart
6 Replies
9. Shell Programming and Scripting
Here's my code -
for File in "${Files}"; do
uuencode "${File}" "$(basename ${File} 2>&-)" 2>&-;
done | mailx -s "subject" "a@b.c"
Now I want to know if there a way to *not* send an email if the "Files" variables turns out to be blank. Any suggestions?
Also, just to clarify, I... (4 Replies)
Discussion started by: nexional
4 Replies
LEARN ABOUT CENTOS
set_color
set_color(1) fish set_color(1)
NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)