I had different problem scenarios with IF statement. Can any expert please enlighten me on the difference with these scenarios. Thank you.
1st Scenario:
testdate=`date +%Y%m`
test=`cat /var/log/database0.$testdate*.log | grep "Errors found during processing" | tail -10`
if
then
... (4 Replies)
New to scripting in general, so patience plz. If I ask a stupid question or don't get it, I thank you for your kindness in advance.
That said, did a for i loops checks to see if a PB* file is there but I need to know two things before I copy the file.
I need to know if the file's create date... (2 Replies)
I am kind of new in Unix and i have to make a menu. I want to put an if statement in the menu. you should enter the filename and it goes to that file. How do i do this? (1 Reply)
HI Unix Gurus,
I have a number of SELECT count(*) statements in an input file and I want to execute it using a shell script but one by one using loop in script....
How can I do this..... (7 Replies)
1. The problem statement, all variables and given/known data:
Two problems I need solving please. I created a script where the user types in 7 numbers as standard input and each one is then stored in an array. Now I need to perform the following calculations on those numbers:
1) Use a while... (11 Replies)
Hello. I am new here and new to scripting. I used to have a very basic script that worked for simple backup/restore of files. I have expanded it and well... I have ended up with a complete mess. It still backs up and restores but there is so many issues that stem from the many if statements I... (3 Replies)
Bash shell, variables i and rem are working fine in 2 separate for loops, but I'd like to consolidate them like this:
for && This gives syntax error on &&.
Thanks in advance for direction. (5 Replies)
Say I have a for loop that parse through a file....Say it look for the colors red and blue in sections of the file. Say it find red before it find blue in the file.
Say I have two if statements in the for loop
Something like if blue is found print blue is my favorite color is the first if... (7 Replies)
Discussion started by: scj2012
7 Replies
LEARN ABOUT REDHAT
lvmdiskscan
LVMDISKSCAN(8) System Manager's Manual LVMDISKSCAN(8)NAME
lvmdiskscan - scan for all disks / multiple devices / partitions available
SYNOPSIS
lvmdiskscan [-d|--debug] [-h|--help] [-l|--lvmpartitions] [-v|--verbose]
DESCRIPTION
To give an overview about online peripherals usable to LVM, lvmdiskscan scans all SCSI, (E)IDE disks, multiple, loop and network block
devices in the system and lists them on standard output with name, size and type (text/hex). The size is the real device size, not the size
stored in the VGDA (See pvcreate(8) ) for details.
OPTIONS
-d/--debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-l, --lvmpartition
Gives an overview about all LVM system identified partitions only.
-v, --verbose
Gives verbose runtime information about lvmdiskscan's activities.
DIAGNOSTICS
lvmdiskscan returns an exit code of 0, if disks / multiple devices / partitions where found and > 0 for error:
1 no special files found
2 no disks / multiple devices / disk partitions found
95 driver/module not in kernel
96 invalid I/O protocol version
97 error locking logical volume manager
98 invalid lvmtab (run vgscan(8))
99 invalid command line
See alsolvm(8), pvcreate(8), pvdisplay(8), pvscan(8)AUTHOR
Heinz Mauelshagen <Linux-LVM@Sistina.com>
Heinz Mauelshagen LVM TOOLS LVMDISKSCAN(8)