Sponsored Content
Top Forums Shell Programming and Scripting Code checking for all values in the same if statement. Post 46756 by oracle8 on Friday 23rd of January 2004 08:26:20 PM
Old 01-23-2004
I found it . There should be a space after and before the '=' in between the braces.
Damn Unix.Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking valid values in variable

I'm using the following in my script. if echo $cpuidle |/usr/bin/egrep ; then when I issue this statement it issues the value of the variable back to stdout which ends up in my output file. Is there a better way to write this? I'm using ksh on solaris 9. (3 Replies)
Discussion started by: MizzGail
3 Replies

2. Shell Programming and Scripting

Error code checking

I'm trying to create a directory from my Perl script. Only if the there was an error I want to let the user know about it. So if the folder exists is ok. This is what I think should work: `mkdir log 2>/dev/null`; if($? == 0 || $? == errorCodeForFileExists) { everyting is fine } else {... (3 Replies)
Discussion started by: jepombar
3 Replies

3. UNIX for Dummies Questions & Answers

checking parameter values passed to script

Hi, I will pass 3 parameters for a script.I have to check the file name and create a new file name with time stamp. the parameters which i'm passing are /dir/stg/filename.txt /dir/path/head.txt /dir/path/tail.txt Now i have to check filename like : if it is a.txt i have to create... (2 Replies)
Discussion started by: ammu
2 Replies

4. Shell Programming and Scripting

checking the return code

hi i have a file, i am reading line by line and checking a line contains a string , `grep "Change state" $LINE` if then echo "The line contains---" else echo "The line does not contains---" i need to check the return code , but i am getting an error ... (4 Replies)
Discussion started by: Satyak
4 Replies

5. Shell Programming and Scripting

Iterative statement to cut values from a line

Hi I am new to shell scripting and trying to get values from a text file, I have a text file with values seperated with "|". like aga|120220090525|120220090525|120220090525|120220090530 bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies

6. Shell Programming and Scripting

SH if statement using FLOAT values

Today I spent longer than I'd like to admit figuring out how to write a Bourne shell IF statement that tests a FLOAT value before executing a block of statements. Here's the solution I found, which invokes bc. Hope this will come in handy for someone: value = testval = if then body... (5 Replies)
Discussion started by: sjepsen
5 Replies

7. Shell Programming and Scripting

Checking the Column values in a file.

Hi All, I have a file that has ~2.9Millions lines with 32 columns respectively. The columns numbers 23,27 are the primary Keys for the file. The fields are delimited by TAB. I need to check the condition If Column number: 20 is NOT NULL Column number: 21 is not 0 Column number: 22 is... (7 Replies)
Discussion started by: filter
7 Replies

8. Shell Programming and Scripting

code checking

i was just wondering how would you check , beside the lock method, if an instance of another code is already running and if it is then output a message to the user saying the program is already running and exit!! the code is in BOURNE SHELLL!!! thanks in advance!! (3 Replies)
Discussion started by: bshell_1214
3 Replies

9. Shell Programming and Scripting

Checking for duplicate code

I have a short line of code that checks very rudimentary for duplicate code: sort myfile.cpp | uniq -c | grep -v "^.*1 " | grep -v "}" It sorts the file, counts occurrences of each line, removes single occurrences and removes the ubiquitous closing brace. The language is C++, but is easily... (3 Replies)
Discussion started by: figaro
3 Replies

10. Shell Programming and Scripting

Pass values to case statement in a function korn shell

I'm in the process of writng a function that consists of a case statement is there a way of calling the function and passing a value to it? ie function1 () { case opt1 do ..... opt2 do..... esac } function opt1 I'm aware the syntax is not correct, but you get the general idea. (1 Reply)
Discussion started by: squrcles
1 Replies
PMSD(8) 						      System Manager's Manual							   PMSD(8)

NAME
pmsd - Periodically Manic System Daemon. Manages the bizzare and sometimes unexplainable behavior exhibited by computers. SYNOPSIS
pmsd [-bcfmp] DESCRIPTION
pmsd is a rogue daemon that is spawned on a semi-regular schedule by init(8). Most of the unusual and quirky behavior associated with mis- behaving computers can be attributed to pmsd. pmsd has a number of command-line options, invoked at run-time by init(8). The ps(1) command will occasionally display the current options, but only if pmsd feels like revealing them. This is usually not the case. pmsd can be manually invoked by the pms(8) command. Make sure there is not a pmsd process already running when you use pms(8); you don't want to be on a system with multiple instances of pmsd run- ning. With no flags, pmsd runs with the default -m option, and any others it feels like using. OPTIONS
-b Bloat. Files randomly grow in size, filling up filesystems and causing quotas to be exceeded. -c Craving. System becomes hungry, eating magnetic tapes, CD-ROM discs, floppies, and anything else a hapless user loads into a remov- able media drive. -f Fatigue. System will pause for a random period of time. It is important to leave the system alone during this time. Attempts to coax the machine into normal operation could cause the spontaneous activation of all command-line switches. This is to be avoided. -m Mood swings. Process priorities and nice values are altered randomly. Swapping usually occurs with no warning, even when memory is available. This is the default behavior. -p Peeved. One or more users are selected as targets of the system's anger. Files are deleted, e-mail copied to /etc/motd, and any Usenet articles posted by the targets are crossposted to misc.test and alt.flame. NOTES
When pmsd is invoked by using the pms(8) command, pmsd ignores any command-line switches and does what it damned well pleases. SEE ALSO
pms(8) BUGS
There are no bugs; how could you ask that? HISTORY
Written by Eric L. Pederson <eric@bofh.org.uk>. 25 March 1996 PMSD(8)
All times are GMT -4. The time now is 01:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy