02-26-2018
The script does work, but you've got the logics wrong. Check without clearing the screen between the loops. Mayhap after settimng the -vx shell options.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Anyone here knows any reasonably priced courses for independent (not corporate) users that can point me to. Already know Unix commands/vi/etc but now need scripting too. Any replies will be appreciated. (2 Replies)
Discussion started by: FastFood
2 Replies
3. Linux
I want to learn Linux/Unix shell scripting, I searched this forum but got some results for Unix Admin books and general Linux books.
Would someone recommend a good Linux Shell Scripting book?
I did order one book
A Practical Guide to Linux(R) Commands, Editors, and Shell Programming ... (4 Replies)
Discussion started by: thoughts
4 Replies
4. Shell Programming and Scripting
Hi All,
I am new to this forum also new to shell scripting.
I have a requirement to read a text from a file which can be in any case like LOGFILE or LogFile or logfile or lOgfILE etc..
Can you guys help me out.
Thanks,
Bacsi01 (1 Reply)
Discussion started by: bacsi01
1 Replies
5. Shell Programming and Scripting
In shell Can I pass " to a program ? If not what is the work around ..?
Can I define * as a wild card charecter that will return all the values from
the files ..?
I am trying to create a tool that will return the values from a property file . This tool has to support all the wild card... (1 Reply)
Discussion started by: app1sxv
1 Replies
6. Shell Programming and Scripting
Hi,
I have general question: i have good working Perl script with .pl extension, and now I have to migrate all to another Linux box, and I was told that I can use only shell scripting, so I'm not sure how different those two things are, will it work without any changes . Is there anything smart I... (6 Replies)
Discussion started by: trento17
6 Replies
7. Shell Programming and Scripting
Is there a command that can switch a character variable from UPPER case to lower case?
like
foreach AC ( ABC BCD PLL QIO)
set ac `COMMAND($AC)`
...
end
Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies
8. Shell Programming and Scripting
Hi,
I am having two set of files with different number of columns and rows.
A set of files have only single row with 20 columns.
B set of files have 1000s of rows with 5 columns.
both set contains equal number of files.
I want to save all the 20 columns of A in variables one by one and... (21 Replies)
Discussion started by: CAch
21 Replies
9. Shell Programming and Scripting
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.
i tired using Ip at the end in the below command. but in ksh it is not working.
sed -n "/$variable/,/constant/p" file
i also... (11 Replies)
Discussion started by: johnjs
11 Replies
10. Shell Programming and Scripting
Foe example we have three environments int,qa and prod.Each environment has some number of servers.
int=Server1,Server2,Server3
qa=Server4,Server5,Server6
prod=Server7,Server8,Server9
echo "Enter the Environment i.e int,qa,prod"
read env
case $env in
int)
## Need command where all the... (9 Replies)
Discussion started by: nareshreddy443
9 Replies
LEARN ABOUT REDHAT
mkdtemp
MKDTEMP(3) Linux Programmer's Manual MKDTEMP(3)
NAME
mkdtemp - create a unique temporary directory
SYNOPSIS
#include <stdlib.h>
char *mkdtemp(char *template);
DESCRIPTION
The mkdtemp() function generates a uniquely-named temporary directory from template. The last six characters of template must be XXXXXX and
these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700. Since it will
be modified, template must not be a string constant, but should be declared as a character array.
RETURN VALUE
The mkdtemp() function returns a pointer to the modified template string on success, and NULL on failure, in which case errno is set appro-
priately.
ERRORS
EINVAL The last six characters of template were not XXXXXX. Now template is unchanged.
Also see mkdir(2) for other possible values for errno.
CONFORMING TO
Introduced in OpenBSD 2.2. Available since glibc 2.1.91.
SEE ALSO
mkdir(2), mkstemp(3), mktemp(3), tmpnam(3), tempnam(3), tmpfile(3)
GNU
2001-10-07 MKDTEMP(3)