Sponsored Content
Top Forums UNIX for Dummies Questions & Answers while loop not taking the not equal to condition Post 302223216 by ssuresh1999 on Friday 8th of August 2008 03:41:25 PM
Old 08-08-2008
Thank you

Thank you all for helping me out mine was a just logic problem Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem taking input from file with for loop

I am trying to take input from a file and direct it into a bash script. This script is meant to be a foreach loop. I would like the script to process each item in the list one by one and direct the output to a file. # cat 1loop #!/bin/bash # this 2>&1 to redirect STDERR & STDOUT to file... (4 Replies)
Discussion started by: bash_in_my_head
4 Replies

2. Solaris

Infinite for loop is taking too much CPU usage %

Hi All, I wrote one simple for loop shell script which prints number..but this loop is infinite...but its taking lot of CPU (15.7) %. if i am using sleep cmd then cpu usage become 0.4 %. Is there anyway to reduce this CPU usage without using sleep cmd? i dont want 2 use sleep cmd... (7 Replies)
Discussion started by: pa.chidhambaram
7 Replies

3. Shell Programming and Scripting

For Loop Taking Too Long

I'm new from UNIX scripting. Please help. I have about 10,000 files from the $ROOTDIR/scp/inbox/string1 directory to compare with the 50 files from /$ROOTDIR/output/tma/pnt/bad/string1/ directory and it takes about 2 hours plus to complete the for loop. Is there a better way to re-write the... (5 Replies)
Discussion started by: hanie123
5 Replies

4. UNIX for Advanced & Expert Users

Comparison and For Loop Taking Too Long

I'd like to 1. Check and compare the 10,000 pnt files contains single record from the /$ROOTDIR/scp/inbox/string1 directory against 39 bad pnt files from the /$ROOTDIR/output/tma/pnt/bad/string1 directory based on the fam_id column value start at position 38 to 47 from the record below. Here is... (1 Reply)
Discussion started by: hanie123
1 Replies

5. Shell Programming and Scripting

if condition in a while loop

Gurus, I need to read a line from a file and strip the characters from it and compare the stripped value with the value I pass to the script while executing it. Below is the code for the same. But when i execute the code, it is throwing an error. #!/bin/ksh . /home/.i_env ... (14 Replies)
Discussion started by: svajhala
14 Replies

6. Shell Programming and Scripting

Use of -z in while loop condition

Hi, Could you please tell what is the meaning of -z in while loop condition. For example, while ; do echo "*** Enter the age " readage (3 Replies)
Discussion started by: vidyaj
3 Replies

7. Shell Programming and Scripting

If not equal to then loop

How do I go about amending this simple script that prompts for a yes/no response so that if neither Y or N are entered it will loop back back to the original prompt #!/bin/ksh echo "Enter yes of no" read answer if then echo "You selected yes" elif then echo "You selected no" elif... (5 Replies)
Discussion started by: gmears
5 Replies

8. Shell Programming and Scripting

grep not equal to condition

I have below files under dir_a and dir_b and i want to sort out number of dir_a and dir_b files seperately and if i do the grep it should retrun 2 files in dir_a and 1 file in dir_b. /dir_a/12345678 /dir_a/87654321 /dir_a/dir_b/12345687 But i am getting cat file|grep dir_a|wc -l 3... (6 Replies)
Discussion started by: prash358
6 Replies

9. Shell Programming and Scripting

While loop problem taking too long

while read myhosts do while read discovered do echo "$discovered" done < $LOGFILE | grep -Pi "|" | egrep... (7 Replies)
Discussion started by: SkySmart
7 Replies

10. Shell Programming and Scripting

Help with taking variable of for loop in textfile

Hi, I am new to unix/linux scripting. I have a text file, listlib.txt where the content: lib1_23 lib34_a ab_li_lab I need to generate a file (.log) of each cell. I am planning to create a (.csh) script that will have for loop with variable taken from listlib.txt. As for now, i have no... (4 Replies)
Discussion started by: mmaz
4 Replies
MOUNT.CONF(8)						    BSD System Manager's Manual 					     MOUNT.CONF(8)

NAME
mount.conf -- root file system mount configuration file SYNOPSIS
/.mount.conf DESCRIPTION
During the bootup process, the FreeBSD kernel will try to mount the root file system using the logic in the vfs_mountroot() function in src/sys/kern/vfs_mountroot.c. The root mount logic can be described as follows: 1. The kernel will synthesize in memory a config file with default directives for mounting the root file system. The logic for this is in vfs_mountroot_conf0(). 2. The kernel will first mount devfs(8) as the root file system. 3. Next, the kernel will parse the in-memory config file created in step 1 and try to mount the actual root file system. See FILE FORMAT for the format of the config file. 4. When the actual root file system is mounted, devfs will be re-mounted on the /dev directory. 5. If a /.mount.conf file does not exist in the root file system which was just mounted, the root mount logic stops here. 6. If a /.mount.conf file exists in the root file system which was just mounted, this file will be parsed, and the kernel will use this new config file to try to re-mount the root file system. See FILE FORMAT for the format of the config file. 7. If the new root file system has a /.mount directory, the old root file system will be re-mounted on /.mount. 8. The root mount logic will go back to step 4. The root mount logic is recursive, and step 8 will be repeated as long as each new root file system which is mounted has a /.mount.conf file. FILE FORMAT
The kernel parses each line in .mount.conf and then tries to perform the action specified on that line as soon as it is parsed. # A line beginning with a # is a comment and is ignored. {FS}:{MOUNTPOINT} {OPTIONS} The kernel will try to mount this in an operation equivalent to: mount -t {FS} -o {OPTIONS} {MOUNTPOINT} / If this is successfully mounted, further lines in .mount.conf are ignored. If all lines in .mount.conf have been processed and no root file system has been successfully mounted, then the action specified by .onfail is performed. .ask When the kernel processes this line, a mountroot> command-line prompt is displayed. At this prompt, the operator can enter the the root mount. .md file Create a memory backed md(4) virtual disk, using file as the backing store. .onfail [panic|reboot|retry|continue] If after parsing all the lines in .mount.conf the kernel is unable to mount a root file system, the .onfail directive tells the kernel what action to perform. .timeout N Before trying to mount a root file system, if the root mount device does not exist, wait at most N seconds for the device to appear before trying to mount it. If .timeout is not specified, the default timeout is 3 seconds. EXAMPLES
The following example .mount.conf will direct the kernel to try mounting the root file system first as an ISO CD9660 file system on /dev/cd0, then if that does not work, as an ISO CD9660 file system on /dev/acd0, and then if that does not work, as a UFS file system on /dev/ada0s1a. If that does not work, a mountroot> command-line prompt will be displayed where the operator can manually enter the root file system to mount. Finally if that does not work, the kernel will panic. .onfail panic .timeout 3 cd9660:/dev/cd0 ro .timeout 0 cd9660:/dev/acd0 ro .timeout 3 ufs:/dev/ada0s1a .ask The following example .mount.conf will direct the kernel to create a md(4) memory disk attached to the file /data/OS-1.0.iso and then mount the ISO CD9660 file system on the md device which was just created. The last line is a comment which is ignored. .timeout 3 .md /data/OS-1.0.iso cd9600:/dev/md# ro # Can also use cd9660:/dev/md0 ro The following example .mount.conf will direct the kernel to create a md(4) memory disk attached to the file /data/base.ufs.uzip and then mount the UFS file system on the md uzip device which was just created by the geom_uzip(4) driver. .md /data/base.ufs.uzip ufs:/dev/md#.uzip ro # Can also use ufs:/dev/md0.uzip ro The following example .mount.conf will direct the kernel to do a unionfs mount on a directory /jail/freebsd-8-stable which has a chroot(2) environment. .timeout 3 unionfs:/jail/freebsd-8-stable NOTES
For each root file system which is mounted, a /dev directory must exist so that the root mount logic can properly re-mount devfs(8). If this directory does not exist, the system may hang during the bootup process. SEE ALSO
nmount(2), md(4), boot.config(5), fstab(5), boot(8), loader(8), mount(8) HISTORY
The mount.conf file first appeared in FreeBSD 9.0. AUTHORS
The root mount logic in the FreeBSD kernel which parses /.mount.conf was written by Marcel Moolenaar <marcel@FreeBSD.org>. This man page was written by Craig Rodrigues <rodrigc@FreeBSD.org>. BSD
July 7, 2013 BSD
All times are GMT -4. The time now is 03:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy