06-06-2016
ksh : split hex number group
Hi,
sry for poor english
I have a group of hex number as : 4D40:4D42
I want so split this group in a list as :
4D40,4D41,4D42
i don't know how i can do this in ksh
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
typeset -i A=16#0
typeset -u A=$a
y=${A#16#}
This converted $a to hex and stored it in y.
Can someone walk me through how this was done?
thanks (2 Replies)
Discussion started by: JamesByars
2 Replies
2. UNIX for Advanced & Expert Users
hi,
which Unix/C function can i use to retrieve all group names with a particular group id?
The following C code prints out the group id number of a particular group name:
------------------------------------------------------------------------
#include <stdio.h>
#include <grp.h>
int... (3 Replies)
Discussion started by: Andrewkl
3 Replies
3. Shell Programming and Scripting
Hi I want to incremental add hex decimal number to a particula field in file
eg: addr =123 dept1=0
addr = 345 dept2 =1
addr2 = 124 dept3 =2
.
.
.
.
.
.
addr3 =567 dept15 =f
Is there any command which add... (8 Replies)
Discussion started by: diddi_linux
8 Replies
4. Shell Programming and Scripting
Guys
Following input line is from /etc/group file.As we know last entry in a line of /etc/group is userlist (all the users belonging to that group).
I need to splilt this one line into 3 lines as shown below (3 because userlist has 3 names in it).
Input:
lp:!:11:root,lp,printq
... (13 Replies)
Discussion started by: ak835
13 Replies
5. Shell Programming and Scripting
Guys, I am looking for a small script which generates HEX sequence. Input to the script is starting hex number - Group ID and number of members in a group and total groups.
e.g: we are generating 2 groups with 4 Members each starting with hex number 036A. I should get o/p in following format.
... (5 Replies)
Discussion started by: dynamax
5 Replies
6. Shell Programming and Scripting
Is it possible by using awk to remove leading zeros for a hex number?
ex:
0000000011179E0A -> 11179E0A
Thank you! (4 Replies)
Discussion started by: carloszhang
4 Replies
7. Shell Programming and Scripting
$ awk 'BEGIN{ pat111=0x1000000002E3E02; snBegin=0x1000000002E3E01; if (pat111<=snBegin) printf "a\n"}'
a
Result is not correct.
Looks like the number is too big.
Any idea?
Thx!
Please use code tags <- click the link! (2 Replies)
Discussion started by: carloszhang
2 Replies
8. Shell Programming and Scripting
Hello,
I woild like to convert hex on KSH not BASH:
I tried to use:
tmp=31
printf "\x"${tmp}""
it works on bash - Output is '1' but not on ksh.
please advice on the right syntax.
Thanks. (4 Replies)
Discussion started by: LiorAmitai
4 Replies
9. Shell Programming and Scripting
Need some help doing this ... with awk maybe
Input
0DF6
0DF7
0DF8
0DF9
0DFA
0DFB
0DFC
0DFD
0DFF
0E00
0E01
0E02
0E03
0E04
0E05
0E06 (11 Replies)
Discussion started by: greycells
11 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I'm looking to split the following hex string into rows of four elements.
I've tried the following but it doesn't seem to work. How can I tell sed to match based on a pair of number(s) and letter(s), and add a newline every 4 pairs?
In addition, I need to add another newline after every... (5 Replies)
Discussion started by: sand1234
5 Replies
LEARN ABOUT NETBSD
vgsplit
VGSPLIT(8) System Manager's Manual VGSPLIT(8)
NAME
vgsplit - split a volume group into two
SYNOPSIS
vgsplit [--alloc AllocationPolicy] [-A|--autobackup {y|n}] [-c|--clustered {y|n}] [-d|--debug] [-h|--help] [-l|--maxlogicalvolumes MaxLogi-
calVolumes] [-M|--metadatatype type] [-p|--maxphysicalvolumes MaxPhysicalVolumes] [-n|--name LogicalVolumeName] [-t|--test] [-v|--verbose]
SourceVolumeGroupName DestinationVolumeGroupName [ PhysicalVolumePath ...]
DESCRIPTION
vgsplit moves one or more physical volumes from SourceVolumeGroupName into DestinationVolumeGroupName. The physical volumes moved can be
specified either explicitly via PhysicalVolumePath, or implicitly by -n LogicalVolumeName, in which case only physical volumes underlying
the specified logical volume will be moved.
If DestinationVolumeGroupName does not exist, a new volume group will be created. The default attributes for the new volume group can be
specified with --alloc, --clustered, --maxlogicalvolumes, --metadatatype, and --maxphysicalvolumes (see vgcreate(8) for a description of
these options). If any of these options are not given, default attribute(s) are taken from SourceVolumeGroupName.
If DestinationVolumeGroupName does exist, it will be checked for compatibility with SourceVolumeGroupName before the physical volumes are
moved. Specifying any of the above default volume group attributes with an existing destination volume group is an error, and no split will
occur.
Logical volumes cannot be split between volume groups. Vgsplit(8) only moves complete physical volumes: To move part of a physical volume,
use pvmove(8). Each existing logical volume must be entirely on the physical volumes forming either the source or the destination volume
group. For this reason, vgsplit(8) may fail with an error if a split would result in a logical volume being split across volume groups.
OPTIONS
See lvm for common options.
SEE ALSO
lvm(8), vgcreate(8), vgextend(8), vgreduce(8), vgmerge(8)
Sistina Software UK LVM TOOLS 2.02.44-cvs (02-17-09) VGSPLIT(8)