How do I create an array from a file using every 3rd line
A file contains the following information shown below. Every ceName has 2 consecutive lines that have to be evaluated, using awk, sed, cut (any common unix tools).
Input file:
To become:
Any advice appreciated.
Thanks,
Bjoern
Last edited by radoulov; 07-31-2009 at 05:52 PM..
Reason: Fix spacing.
Hi,
I have a ksh script I would like to modify.
What I need it to do is look at an ever changing log file and print the 3rd to last line. Is there a command that will display this? I can not use line numbers because the file is always growing.
Thanks for any help (2 Replies)
Hi,
I wish to store $string1 in $string1array a character in each array element.
Then i wish to echo the entire array to the screen so that it reads as the normal string again.
I have been trying with the code below but does not work. Please help...
To put string into array:
... (5 Replies)
I'm new to forums, it's my first time posting.
I have a sun v490 server. I just installed solaris 10.6, on the local drives. I'm being asked to do the following:
For Oracle install I need “oracle” user that belong to “dba” and “oinstall” groups. File system /u01/app/oracle, 10GB (if... (6 Replies)
Hello,
i want to use new line character in cut command
i want to display 3rd line of a file using cut only( not by sed or head -tail command)
can anyone suggest me ?
Regards (12 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Hi All,
I have two files. File1 and File2.
Want to create another file with all the records of File1 those are not present in File2.
Please guide.
Thanks in advanced.
Anupam (3 Replies)
Hi guys and gals...
MacBook Pro.
OSX 10.13.2, default bash terminal.
I have a flat file 1920 bytes in size of whitespaces only. I need to put every single whitespace character into a bash array cell.
Below are two methods that work, but both are seriously ugly.
The first one requires that I... (7 Replies)
Discussion started by: wisecracker
7 Replies
LEARN ABOUT SUSE
sysdef
sysdef(1M) System Administration Commands sysdef(1M)NAME
sysdef - output system definition
SYNOPSIS
/usr/sbin/sysdef [-i] [-n namelist]
/usr/sbin/sysdef [-h] [-d] [-i] [-D]
DESCRIPTION
The sysdef utility outputs the current system definition in tabular form. It lists all hardware devices, as well as pseudo devices, system
devices, loadable modules, and the values of selected kernel tunable parameters.
It generates the output by analyzing the named bootable operating system file (namelist) and extracting the configuration information from
it.
The default system namelist is /dev/kmem.
OPTIONS -i Prints the configuration information from /dev/kmem. This is the default and only needs to be specified if the configura-
tion information from both /dev/kmem and the system file specified with the "-n namelist" option is needed.
-nnamelist Specifies a namelist other than the default (/dev/kmem). The namelist specified must be a valid bootable operating system.
-h Prints the identifier of the current host in hexadecimal. This numeric value is unique across all Sun hosts.
-d The output includes the configuration of system peripherals formatted as a device tree.
-D For each system peripheral in the device tree, display the name of the device driver used to manage the peripheral.
EXAMPLES
Example 1: Sample output format
The following example displays the format of the sysdef -d output:
example% sysdef -d
Node 'SUNW,Ultra-5_10', unit #-1
Node 'packages', unit #-1 (no driver)
Node 'terminal-emulator', unit #-1 (no driver)
Node 'deblocker', unit #-1 (no driver)
Node 'obp-tftp', unit #-1 (no driver)
Node 'disk-label', unit #-1 (no driver)
Node 'SUNW,builtin-drivers', unit #-1 (no driver)
Node 'sun-keyboard', unit #-1 (no driver)
Node 'ufs-file-system', unit #-1 (no driver)
Node 'chosen', unit #-1 (no driver)
Node 'openprom', unit #-1 (no driver)
Node 'client-services', unit #-1 (no driver)
Node 'options', unit #0
Node 'aliases', unit #-1 (no driver)
Node 'memory', unit #-1 (no driver)
Node 'virtual-memory', unit #-1 (no driver)
Node 'pci', unit #0
Node 'pci', unit #0
Node 'ebus', unit #0
Node 'auxio', unit #-1 (no driver)
Node 'power', unit #0
Node 'SUNW,pll', unit #-1 (no driver)
Node 'se', unit #0 (no driver)
Node 'su', unit #0
Node 'su', unit #1
Node 'ecpp', unit #-1 (no driver)
Node 'fdthree', unit #0
Node 'eeprom', unit #-1 (no driver)
Node 'flashprom', unit #-1 (no driver)
Node 'SUNW,CS4231', unit #0 (no driver)
Node 'network', unit #0
Node 'SUNW,m64B', unit #0
Node 'ide', unit #0
Node 'disk', unit #-1 (no driver)
Node 'cdrom', unit #-1 (no driver)
Node 'sd', unit #1
Node 'dad', unit #1
Node 'pci', unit #-1 (no driver)
Node 'SUNW,UltraSPARC-IIi', unit #-1 (no driver)
Node 'pseudo', unit #0
[output truncated]
FILES
/dev/kmem default operating system image
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO hostid(1), prtconf(1M), nlist(3ELF), attributes(5)SunOS 5.10 4 Oct 2004 sysdef(1M)