Sponsored Content
Top Forums UNIX for Dummies Questions & Answers New to shell script and lost.... Post 302247831 by LRoberts on Thursday 16th of October 2008 12:03:20 PM
Old 10-16-2008
I tried it this way thinking it would work....

if [ $? != '11' ] || [ $? != '31' ]; then


But that did not seem to work. I need to check if the $? is either a 11 or a 31. If its not either one then do action.

I am really lost on the format...
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Lost Data Lost Admin

First time so excuse my ignorance please. I may not be accurately describing the issue. I have inherited a small lab mostly SUN V120s. We lost power and are trying to recover. Nope no backups... The primary issue I have is 1 box is an Oracle Server. It has 2 36Gb harddrives. I am able to... (3 Replies)
Discussion started by: murphsr
3 Replies

2. UNIX for Advanced & Expert Users

All alias in .profile lost when "script" command is called

Hi, I was trying to call "script <an ip add>" command from .profile file to log everything whenever anyone logs in to this user. I did the following at the end of .profile. 1) Extracted the IP address who logged in 2) Called script < ip add> . The problem I am facing is all, aliases etc. written... (3 Replies)
Discussion started by: amicon007
3 Replies

3. Post Here to Contact Site Administrators and Moderators

My shell pipe 2 multipipes thread is lost ?

Hi, yesterday I have got reply in my thread how to redirect shell pipe to 2 pipes. I would read that answer once again, as my re.re. is also lost Jack (6 Replies)
Discussion started by: jack2
6 Replies

4. Homework & Coursework Questions

brand new user!.. Lost on BASH script writing

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: I have just gotten into writing bash scripts for a class, part of the assignment is to read and be able to tell... (4 Replies)
Discussion started by: Byrang
4 Replies

5. Shell Programming and Scripting

Data pipe lost when using ssh in shell script

Hi, I want to do SSH on many different machines and then run some commands on them. A binary application randomly generates IP addresses and my script will take care of doing SSH. $ ./IPGen.exe | ./myScript.sh my script looks like this: while read line; do result1=$(ssh $line... (2 Replies)
Discussion started by: siavash
2 Replies

6. Homework & Coursework Questions

Lost 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: Hey whats up everyone, Currently I'm stuck. In this question I have to use the following commands test, shift,... (7 Replies)
Discussion started by: AdamSahp
7 Replies

7. Shell Programming and Scripting

Why commands inside bash script lost effectiveness?

Hi, I have a bash script to run many system commands on CentOS machine, but I am puzzled by some commands had no effect on parent environment. For example, I want to refresh the desktop xdg menu when some processes added or deleted items from desktop xdg menu. If I run "killall gnome-panel"... (4 Replies)
Discussion started by: hce
4 Replies

8. Programming

Learning python, lost with script

Hi there, im just having a hard time understanding why this code does not print anything that is suppose to print: score = raw_input ('what is your score? \n') try: if 1.0 == float(score) >= 0.9: print "A" elif 0.9 > float(score) >= 0.8: ... (1 Reply)
Discussion started by: la2015
1 Replies

9. Shell Programming and Scripting

The Shell lost the inverted comma in a nested ssh command

Hi, i want use this Comand for my psql request sh ssh -o StrictHostKeyChecking=no rootatemailaddress.de sudo psql -U postgres -c "select pg_terminate_backend(pid) from pg_stat_activity where datnam=\'$DB\';"'" but the shell lost the inverted comma for datnam=\'$DB\'. The request deliver... (2 Replies)
Discussion started by: peterpane007
2 Replies
FSCK_HFS(8)						    BSD System Manager's Manual 					       FSCK_HFS(8)

NAME
fsck.hfs -- HFS file system consistency check SYNOPSIS
fsck.hfs -q [-df] special ... fsck.hfs -p [-df] special ... fsck.hfs [-n | -y | -r] [-dfgl] [-m mode] [-c size] special ... DESCRIPTION
The fsck.hfs utility verifies and repairs standard HFS and HFS+ file systems. The first form of fsck.hfs quickly checks the specified file systems to determine whether they were cleanly unmounted. The second form of fsck.hfs preens the specified file systems. It is normally started by fsck(8) during systen boot, when a HFS file system is detected. When preening file systems, fsck.hfs will fix common inconsistencies for file systems that were not unmounted cleanly. If more serious problems are found, fsck.hfs does not try to fix them, indicates that it was not successful, and exits. The third form of fsck.hfs checks the specified file systems and tries to repair all detected inconsistencies. If no options are specified fsck.hfs will always check and attempt to fix the specified file systems. The options are as follows: -c size Specify the size of the cache used by fsck.hfs internally. Bigger size can result in better performance but can result in deadlock when used with -l option. Size can be specified as a decimal, octal, or hexadecimal number. If the number ends with a ``k'', ``m'', or ``g'', the number is multiplied by 1024 (1K), 1048576 (1M), or 1073741824 (1G), respectively. -d Display debugging information. This option may provide useful information when fsck.hfs cannot repair a damaged file system. -f When used with the -p option, force fsck.hfs to check `clean' file systems, otherwise it means force fsck.hfs to check and repair journaled HFS+ file systems. -g Causes fsck.hfs to generate its output strings in GUI format. This option is used when another application with a graphical user interface (like Mac OS X Disk Utility) is invoking the fsck.hfs tool. -l Lock down the file system and perform a test-only check. This makes it possible to check a file system that is currently mounted, although no repairs can be made. -m mode Mode is an octal number that will be used to set the permissions for the lost+found directory when it is created. The lost+found directory is only created when a volume is repaired and orphaned files or directories are detected. fsck.hfs places orphaned files and directories into the lost+found directory (located at the root of the volume). The default mode is 01777. -p Preen the specified file systems. -q Causes fsck.hfs to quickly check whether the volume was unmounted cleanly. If the volume was unmounted cleanly, then the exit status is 0. If the volume was not unmounted cleanly, then the exit status will be non-zero. In either case, a message is printed to standard output describing whether the volume was clean or dirty. -y Always attempt to repair any damage that is found. -n Never attempt to repair any damage that is found. -r Rebuild the catalog file on the specified file system. This option currently will only work if there is enough contiguous space on the specified file system for a new catalog file and if there is no damage to the leaf nodes in the existing catalog file. SEE ALSO
fsck(8) BUGS
fsck.hfs is not able to fix some inconsistencies that it detects. HISTORY
The fsck.hfs command appeared in Mac OS X Server 1.0 . Mac OS X November 21, 2002 Mac OS X
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy