To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
Hi experts,
I am doing an exercise which has the following requirements.
Charlie will bite your finger exactly 50% of the time. First, write a function isBitten() that returns TRUE with 50% probability, and FALSE otherwise
To generate a webpage that displays "Charlie bit your finger!" or... (1 Reply)
I need to implement something like this.
1) search for a file(say *.doc) from a path (say /home/user/temp)
2) if file found & if file size > 0 : yes --> file valid
else : print file not valid.
I am trying to implement something like this, but seems i am terribly wrong somewhere.. ... (1 Reply)
I'm trying to create a shell script that will check for new files and or folders and if it exist then copy them to a different directory.
Does anyone have a idea?
if ;
then
echo "Copying files from the Upgrade Server"
cp -Ruavp /home/upgrade/hex-code/*... (7 Replies)
I want to add a conditional statement to a user's .profile file. I have a certain number of users that log in and use the rksh (Restricted Korn Shell). When they log in, it starts a certain program and when they exit this program, the system logs them out. When they are in this program, they can... (2 Replies)
Hi,
I'm getting a "bad number" error from the following conditional if statement. I understand the results of the grep command are not being treated a an integer but am unsure of the correct syntax. Any help would be appreciated.
if
Thanks (2 Replies)
Hi all,
The following code is to find if a list of numbers from one file are within the range in another file.
awk -F, '\
BEGIN {
while ((getline < "file2") > 0)
file2=$3
}
{for (col1 in file2)
if ($0>=30 && $1<=45)
print $0} ' FILE1
But where I have the number 30 and 45, I... (3 Replies)
can somebody help, what quote i should use in below statement or what wrong of it ?
the 1st (*) is a char, the 2nd and 3rd (*) is a wildcard
if ] && ] && ]
................^ .............^
then
echo "ok"
fi
thanks in advance. (2 Replies)
how can i use awk or sed to do a conditional statement, so that
HH:MM
if MM not great than 30 , then MM=00
else MM=30
ie:
10:34 will display 10:30
10:29 will display 10:00
a=$(echo 10:34 | awk ......)
Thanks in advance (10 Replies)