Sponsored Content
Full Discussion: shell script question
Top Forums Shell Programming and Scripting shell script question Post 302338248 by s_linux on Monday 27th of July 2009 11:01:06 AM
Old 07-27-2009
Thanks for your reply. code tags???

I tried with

if [ "$server_status" = "server may down"]

but I dont see the out file name when server is down. I think as soon as it reads this line "server_status= some command | grep "Total error: 0" and as the server is down, it's giving error saying server is down. it should go to the next line and check if condition, then it should create a file.

small change is the code, instead of checking for file, I'm checking for the directory with -d option.
Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script question

I am using ksh. There is a report having amounts in the following format, 34343.67- 2343.45 23434.89- I want to sum up all the amounts. For this I first need to find out if there is a minus sign at the end and prefix it before summing up. How to achieve this? I thought of using an... (2 Replies)
Discussion started by: tselvanin
2 Replies

2. Shell Programming and Scripting

Shell script question

Hello, i am doing a project for school and i cannot figure out whats wrong with my 2 programs they dont seem to work at all. the first program is called isprime and naturally it checks to see if hte number is prime or not here is my code: #!/usr/bin/bash num=$1 echo you typed if ... (2 Replies)
Discussion started by: jbou1087
2 Replies

3. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "sc.sh" in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies

4. Shell Programming and Scripting

Shell Script question

Hello Experts, I am new at this and need some help. I am looking for a delete command that allows me after I grep for the hostname to delete all the lines between two characters. for example I want to delete the first line all the way up to the } character host test019 { hardware ethernet... (10 Replies)
Discussion started by: ryanique
10 Replies

5. Shell Programming and Scripting

shell script question

Hi, The contents of my file is below: Name,Location,Degree,Gender,Awards Robert,Philadelphia,Accounting,Male,5 Jane,Chicago,Business,Female,2 Allan,New York,Engineering,Male,6 Tom,Detroit,Computer Science,Male,10 Nancy,Milwaukee,Engineering,Female,4 I want to add a "ID" in the 1st line... (2 Replies)
Discussion started by: xinoo
2 Replies

6. Homework & Coursework Questions

Question on shell script

Hiiiiiiiiiiiii all, Please i want your help fast, the teacher gave us this assignment can u help me to write it? this is the question: Write a shell script to point all prime numbers from the fibonacci series of integer N? using Red hat Os Thanks all and waiting for ur answers... (1 Reply)
Discussion started by: moonlips
1 Replies

7. Homework & Coursework Questions

question on shell script

hiiiiiiiiiiiii,,I found an error on my following script but couldnt find it!!! Can you please help me as soon as possible?! echo "enter a number " read n i=0 first=0 second=1 result=0 prime="true" echo –n " $first $second " while do result=`expr $first + $second` first=$second... (10 Replies)
Discussion started by: moonlips
10 Replies

8. Homework & Coursework Questions

question in shell script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a Bourne shell script which: • Has one command line argument. • If the command line argument is a... (5 Replies)
Discussion started by: abood1190
5 Replies

9. Shell Programming and Scripting

Shell script question

Hi all, can you plz check whether the below code is correct & some inputs. I need to read the below file and process it. input : /home/ibm/var.txt urgent not urgent not needed. #!/usr/bin/ksh VAR=/home/ibm/var.txt if ] then (7 Replies)
Discussion started by: ramkumar15
7 Replies

10. Shell Programming and Scripting

Shell script question

As per code it is getting matched. not sure why it assigning to cols=0. Any inputs please. Input : passed is shell.sh c tablename. if ; then cols=1 table=$2 else cols=0 table=$1 fi (1 Reply)
Discussion started by: ramkumar15
1 Replies
BOS_SETAUTH(8)						       AFS Command Reference						    BOS_SETAUTH(8)

NAME
bos_setauth - Sets authorization checking requirements for all server processes SYNOPSIS
bos setauth -server <machine name> -authrequired (on | off) [-cell <cell name>] [-noauth] [-localauth] [-help] bos seta -s <machine name> -a (on | off) [-c <cell name>] [-n] [-l] [-h] DESCRIPTION
The bos setauth command enables or disables authorization checking on the server machine named by the -server argument. When authorization checking is enabled (the normal case), the AFS server processes running on the machine verify that the issuer of a command meets its privilege requirements. When authorization checking is disabled, server processes perform any action for anyone, including the unprivileged user "anonymous"; this security exposure precludes disabling of authorization checking except during installation or emergencies. To indicate to the server processes that authorization checking is disabled, the BOS Server creates the zero-length file /var/lib/openafs/local/NoAuth on its local disk. All AFS server processes constantly monitor for the NoAuth file's presence and do not check for authorization when it is present. The BOS Server removes the file when this command is used to re-enable authorization checking. CAUTIONS
Do not create the NoAuth file directly, except when directed by instructions for dealing with emergencies (doing so requires being logged in as the local superuser "root"). Use this command instead. OPTIONS
-server <machine name> Indicates the server machine on which to enable or disable authorization checking. Identify the machine by IP address or its host name (either fully-qualified or abbreviated unambiguously). For details, see bos(8). -authrequired (on | off) Enables authorization checking if the value is "on", or disables it if the value is "off". -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8). -noauth Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see bos(8). -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see bos(8). -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following example disables authorization checking on the machine "fs7.abc.com": % bos setauth -server fs7.abc.com -authrequired off PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on the machine named by the -server argument, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included. SEE ALSO
KeyFile(5), NoAuth(5), UserList(5), bos(8), bos_restart(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BOS_SETAUTH(8)
All times are GMT -4. The time now is 06:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy