09-08-2015
Great! Now, these two rows are aligned within each column. The output is perfectly formatted.
Would you please explain a little bit on 'split', 'sprintf', 'OFS', 'h ORS r'?
How does it work? It's an advanced script with so many keywords I've never seen before.
Thanks you very much!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to substitute a phrase which contains square brackets.
change TO
how?
Thanks (2 Replies)
Discussion started by: gilead29
2 Replies
2. UNIX for Dummies Questions & Answers
All,
I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies
3. Shell Programming and Scripting
Hi I just stumbled on to these forums today, and I relatively new to unix. I am trying to figure out how to find the square root of a number using a shell script. I am using bash and I have searched and searched but cannot figure out square roots. Hopefully someone can point me in the right... (3 Replies)
Discussion started by: davex4285
3 Replies
4. UNIX for Dummies Questions & Answers
I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run.
#!/bin/bash
#script to find area of a square based on user input
if
then
echo " Usage -$0 x "
echo " where x is the dimension of the square "
exit 1
n1=$1
... (2 Replies)
Discussion started by: SnydeMz
2 Replies
5. Shell Programming and Scripting
Hello,
I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes...
I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes.
To do... (10 Replies)
Discussion started by: worm
10 Replies
6. Shell Programming and Scripting
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
7. Shell Programming and Scripting
I have a file with say 50 columns, each containing a whole lot of data.
Each column contains data from a separate simulation, but each simulation is related to the data in the last (REFERENCE) column $50
I need to calculate the RMS deviation for each data line, i.e. column 1 relative to... (12 Replies)
Discussion started by: chrisjorg
12 Replies
8. Solaris
Hi All
After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies
9. Shell Programming and Scripting
For example, I have files called A.txt and B.txt.
A.txt
#x yj
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100B.txt
#x ^yj
1 1
2 8
3 27
4 64
5 125
6 216 (2 Replies)
Discussion started by: Tzeronone
2 Replies
10. What is on Your Mind?
Hi all, (mainly Neo)...
I keep noticing that the SQRT code I wrote recently for a POSIX shell keeps appearing, (the green colour sticks out like a sore thumb).
So I decided to take a look on Google.
Guess what?
UNIX.COM comes first in Google's listing just from two words, see image... (2 Replies)
Discussion started by: wisecracker
2 Replies
VGS(8) System Manager's Manual VGS(8)
NAME
vgs - report information about volume groups
SYNOPSIS
vgs [-a|--all] [--aligned] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--nameprefixes] [--noheadings] [--nosuffix] [-o|--options
[+]Field[,Field]] [-O|--sort [+|-]Key1[,[+|-]Key2[,...]]] [-P|--partial] [--rows] [--separator Separator] [--unbuffered] [--units hHbB-
sSkKmMgGtTpPeE] [--unquoted] [-v|--verbose] [--version] [VolumeGroupName [VolumeGroupName...]]
DESCRIPTION
vgs produces formatted output about volume groups.
OPTIONS
See lvm for common options.
--all List all volume groups. Equivalent to not specifying any volume groups.
--aligned
Use with --separator to align the output columns.
--nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful with --noheadings to produce a list of field=value pairs that can
be used to set environment variables (for example, in udev (7) rules).
--noheadings
Suppress the headings line that is normally the first line of output. Useful if grepping the output.
--nosuffix
Suppress the suffix on output sizes. Use with --units (except h and H) if processing the output.
-o, --options
Comma-separated ordered list of columns. Precede the list with '+' to append to the default selection of columns.
Use -o vg_all to select all volume group columns.
Use -o help to view the full list of columns available.
Column names include: vg_fmt, vg_uuid, vg_name, vg_attr, vg_size, vg_free, vg_sysid, vg_extent_size, vg_extent_count, vg_free_count,
max_lv, max_pv, pv_count, lv_count, snap_count, vg_seqno, vg_tags, vg_mda_count, vg_mda_free, and vg_mda_size, vg_mda_used_count.
Any "vg_" prefixes are optional. Columns mentioned in either pvs (8) or lvs (8) can also be chosen, but columns cannot be taken
from both at the same time.
The vg_attr bits are:
1 Permissions: (w)riteable, (r)ead-only
2 Resi(z)eable
3 E(x)ported
4 (p)artial: one or more physical volumes belonging to the volume group are missing from the system
5 Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
6 (c)lustered
-O, --sort
Comma-separated ordered list of columns to sort by. Replaces the default selection. Precede any column with - for a reverse sort on
that column.
--rows Output columns as rows.
--separator Separator
String to use to separate each column. Useful if grepping the output.
--unbuffered
Produce output immediately without sorting or aligning the columns properly.
--units hHbBsSkKmMgGtTpPeE
All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes,
(p)etabytes, (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify custom units e.g. --units 3M
--unquoted
When used with --nameprefixes, output values in the field=value pairs are not quoted.
SEE ALSO
lvm(8), vgdisplay(8), pvs(8), lvs(8)
Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGS(8)