10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm looking to expand the following command:
INACTIVE_KERNELS=$(python -mplatform | grep -qi red && rpm -qa | grep '^kernel-' |grep -vE `uname -r` | paste -sd \; || echo "Not Red Hat Server")
Currently this command will check if my server is RedHat server using the grep -qi... (6 Replies)
Discussion started by: greavette
2. Shell Programming and Scripting
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
$ cat file2
234... (4 Replies)
Discussion started by: FemoTheDon
3. UNIX for Dummies Questions & Answers
file1 and file2 has 1 bit
send out email
send out email
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Discussion started by: lawsongeek
4. Shell Programming and Scripting
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
Discussion started by: nickzourdos
5. Shell Programming and Scripting
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
Discussion started by: ch33ry
6. Shell Programming and Scripting
how can we execute multiple statements in
in else condition i have multiple statements
but it executing only one statement
is there any way to execute multiple statements (4 Replies)
Discussion started by: nani1984
7. Shell Programming and Scripting
HI Unix Gurus,
I have a number of SELECT count(*) statements in an input file and I want to execute it using a shell script but one by one using loop in script....
How can I do this..... (7 Replies)
Discussion started by: ustechie
8. Shell Programming and Scripting
Hav automated a process, and it is working fine.
for first process alone
status = ` ps -ef |grep a `
echo " Success" > temp/logfile
echo " Failure" > temp/logfile
Now I hav to write script to automated some 2 process and then send mail using cron..
... (5 Replies)
Discussion started by: NehaKrish
9. Shell Programming and Scripting
I want to do multiple comparisons on a series of numbers from an array:
I send the numbers in file1 through want to print out some info from file2 based on some conditions.
The syntax just isn't correct???
... (2 Replies)
Discussion started by: dcfargo
10. Shell Programming and Scripting
Hi all, I'm confused about the proper syntax for multi-conditional if then statements. I'm trying to set limitations on info input on the command line.. i.e.
if ] ;then
print "You have entered an invalid option."
Can someone please clue me in on what is wrong with my syntax;... (3 Replies)
Discussion started by: tim mauger