Sponsored Content
Top Forums Shell Programming and Scripting Help with shell script to check the condition. Post 302299396 by sakthilinux on Friday 20th of March 2009 03:01:47 AM
Old 03-20-2009
omit those..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help with test condition in shell script

I'm new to scripting and I need help with a bourn shell script. What i'm trying to do is a test condition where "if the time is within 2 hours, it's true" and so on. The time is in the following format DATE=`/bin/date +"%Y%m%d%H%S"` for example, 20060907152000. So, what the script first... (9 Replies)
Discussion started by: pieman8080
9 Replies

2. Shell Programming and Scripting

script to check for a condition inside a file

Hi I am writing a script file which sends the log files along with their size in a folder named log to a file called temp.log using the following cmd: ls -st 190_GSTV_HUX_003QISCGSK026** >> /home/user/temp.log the temp.log looks like this: 16 190_GSTV_HUX_003QISCGSK026_message070321.log ... (11 Replies)
Discussion started by: kiran1112
11 Replies

3. AIX

if condition in AIX5.3-10 shell script

True if file exists and has been modified since it was last read. if then command else exit fi i am on AIX5.3-10. it does not understand -N any other way. i can use -ot (file1 is older than file2), but prefer -N if possible. (3 Replies)
Discussion started by: tjmannonline
3 Replies

4. Shell Programming and Scripting

IF condition against a ARRAY in shell script

Hi, I want to check a particular string inserted by User to be checked against the values i already have in a ARRAY string using IF condition. Is this possible? if yes how to do that. example : i have a,b,c,d,e,f values in a array called values i asked user to enter a value: user entered... (2 Replies)
Discussion started by: kukretiabhi13
2 Replies

5. Shell Programming and Scripting

Shell script that check the argument passed to it and prints error if test condition is not met

I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it. I am using below code, but its not working. can anyone help. #!/bin/bash if ]; then echo 'An integer argument is passed to the script hence... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

6. Shell Programming and Scripting

Errors in if condition validations-Shell Script

Hello All, i am facing difficulty in validating the values, kindly help me in resolving the issue. Thanks a lot in advance. -Chandra Script:Test.sh #! /bin/sh # *************************************************************************** # Function to display help function usage()... (1 Reply)
Discussion started by: duddukuri
1 Replies

7. UNIX for Dummies Questions & Answers

While condition in shell script

while do if ;then read driverName else driverName="" fi done can anyone please explain what exactly is happening on 1st line...is it like the conditions being ORed...I have no clue about this. (4 Replies)
Discussion started by: rtagarra
4 Replies

8. Shell Programming and Scripting

Substring check in IF condition in shell script

I want to check if the string has the substring in IF condition then process... i tried below but not working if ]; then ............. field can be "reserved1" ....reservedn / fillspaces1 ... fillspacesn (4 Replies)
Discussion started by: greenworld123
4 Replies

9. Shell Programming and Scripting

Need Help to add Condition in Shell Script..

Hi Team, I m very new to shell scripting , i want to add following condition in my script . Can anybody help me. There are three port in My node "$port" port_A port_B port_C I Want to add following Conditions in my script. If Node is connected to port_A and port_B script... (10 Replies)
Discussion started by: Ganesh Mankar
10 Replies

10. Shell Programming and Scripting

If condition shell script beginner

Hi all I have the folloing process that needs checking often: ps -ef | grep ih bscsrtx 206 15901 0 11:28:10 pts/6 0:00 fih -r4 bscsrtx 218 15901 0 11:28:27 pts/6 0:01 aih bscsrtx 29763 15901 4 11:27:16 pts/6 0:59 rdh -prih root 429 27268 0 11:30:15 pts/td ... (13 Replies)
Discussion started by: fretagi
13 Replies
MKINITRD(8)						      System Manager's Manual						       MKINITRD(8)

NAME
mkinitrd - creates initial ramdisk images for preloading modules SYNOPSIS
mkinitrd [--version] [-v] [-f] [--preload=module] [--omit-scsi-modules] [--omit-raid-modules] [--omit-lvm-modules] [--with=module] [--image-version] [--fstab=fstab] [--nocompress] [--builtin=module] [--nopivot] image kernel-version DESCRIPTION
mkinitrd creates filesystem images which are suitable for use as Linux initial ramdisk (initrd) images. Such images are often used for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. mkinitrd automatically loads filesystem modules (such as ext3 and jbd), IDE modules, all scsi_hostadapter entries in /etc/modules.conf, and raid modules if the system's root partition is on raid, which makes it simple to build and use kernels using modular device drivers. Any module options specified in /etc/modules.conf are passed to the modules as they are loaded by the initial ramdisk. If the root device is on a loop device (such as /dev/loop0), mkinitrd will build an initrd which sets up the loopback file properly. To do this, the fstab must contain a comment of the form: # LOOP0: /dev/hda1 vfat /linux/rootfs LOOP0 must be the name of the loop device which needs to be configured, in all capital lettes. The parameters after the colon are the device which contains the filesystem with the loopback image on it, the filesystem which is on the device, and the full path to the loop- back image. If the filesystem is modular, initrd will automatically add the filesystem's modules to the initrd image. The root filesystem used by the kernel is specified in the boot configuration file, as always. The traditional root=/dev/hda1 style device specification is allowed. If a label is used, as in root=LABEL=rootPart the initrd will search all available devices for an ext2 or ext3 filesystem with the appropriate label, and mount that device as the root filesystem. OPTIONS
--builtin=module Act as if module is built into the kernel being used. mkinitrd will not look for this module, and will not emit an error if it does not exist. This option may be used multiple times. -f Allows mkinitrd to overwrite an existing image file. --fstab=fstab Use fstab to automatically determine what type of filesystem the root device is on. Normally, /etc/fstab is used. --image-version The kernel version number is appended to the initrd image path before the image is created. --nocompress Normally the created initrd image is compressed with gzip. If this option is specified, the compression is skipped. --nopivot Do not use the pivot_root system call as part of the initrd. This lets mkinitrd build proper images for Linux 2.2 kernels at the expense of some features. In particular, some filesystems (such as ext3) will not work properly and filesystem options will not be used to mount root. This option is not recommended, and will be removed in future versions. --omit-lvm-modules Do not load any lvm modules, even if /etc/fstab expects them. --omit-raid-modules Do not load any raid modules, even if /etc/fstab and /etc/raidtab expect them. --omit-scsi-modules Do not load any scsi modules, including 'scsi_mod' and 'sd_mod' modules, even if they are present. --preload=module Load the module module in the initial ramdisk image. The module gets loaded before any SCSI modules which are specified in /etc/mod- ules.conf. This option may be used as many times as necessary. -v Prints out verbose information while creating the image (normally the mkinitrd runs silently). --version Prints the version of mkinitrd that's being used and then exits. --with=module Load the modules module in the initial ramdisk image. The module gets loaded after any SCSI modules which are specified in /etc/mod- ules.conf. This option may be used as many times as necessary. FILES
/dev/loop* A block loopback device is used to create the image, which makes this script useless on systems without block loopback support available. /etc/modules.conf Specified SCSI modules to be loaded and module options to be used. SEE ALSO
fstab(5), insmod(1), kerneld(8), lilo(8) AUTHOR
Erik Troan <ewt@redhat.com> 4th Berkeley Distribution Sat Mar 27 1999 MKINITRD(8)
All times are GMT -4. The time now is 09:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy