Ok heres the situation,
We use Solaris 8 at work with Sybase for the db. I need to be able to easily create visual diagrams of some of our more complex systems. I've been using Visio which is such a manual process and takes a while.
I was thinking maybe using Visio somehow in conjunction... (0 Replies)
Hi,
I'm a oracle DBA with little knowledge of Unix.
I wanted to write some shell scripts which will be helpful for DBA's regular activity.
As i'm a new to oracle with unix can any plese tell me what are all the activities can be done throgh Unix Shell Scripts also suggest me how to learn... (1 Reply)
Hello all,
my unix is bash based and the finger command output is:
Login Name Tty Idle LoginTime Office
amos.john Amos John pts/26 1 Dec 5 16:18 (77.100.22.07)
What am trying to achieve is extract the Login (amos.john) and Name (Amos John) from this output without using awk or sed.
... (1 Reply)
Hi everyone,
I'm trying to extract the user name and full name from the finger command without using sed or awk.
Any pointers?
Thanks in advance. (6 Replies)
Hi all,
I am stuck with a ruby script that extracts detials from yaml file and processes accordingly.
the yaml file
confivnic:
device:
vnic1:
policy:
- L2
mode: active
vnic2:
policy:
- L3
- L4
mode: active
type: aggr
... (1 Reply)
Hi all,
I have two .txt file i.e.
First text file:
2
4
1
4
Second text file
2 1.nii.gz
4 334.nii.gz
1 12.nii.gz
4 134.nii.gz
If entry in 1st column of 1st text file matches the 1st column of 2nd text file, then copy the file (name of which is the second column) associated with... (4 Replies)
Hello,
I am very new to solaris so please bear with me. I have 2 machines in question. For both I am trying to get the HBA Card Hardware information such as:
HBA Model Name
HBA Firmware version
HBA Port details
HBA Driver details
First machine is a Solaris 10. When I execute fcinfo... (6 Replies)
how to extract user machine name for current terminal using finger command
below command gives machinename for all session , is it possible to filter it to only currernt terminal ?
finger -b -p $LOGNAME | grep from (12 Replies)
i have a text file which i am generating from few sqls.
format is like :
col1 col2 col3 col4 col5
1001 DONE ABC 17-sep-14 12:02:05
1001 DONE ABC 17-sep-14 12:02:05
1001 DONE ABC 17-sep-14 12:02:55
1001 REDONE ABC ... (6 Replies)
Discussion started by: deepakiniimt
6 Replies
LEARN ABOUT ULTRIX
csplit
csplit(1) General Commands Manual csplit(1)Name
csplit - context split
Syntax
csplit [ -s ] [ -k ] [ -f prefix ] file arg1 [ ...argn ]
Description
The command reads file and separates it into n+1 sections, as defined by the arguments arg1...argn. By default, the sections are placed in
xx00...xxn (n may not be greater than 99). The named file is sectioned in the following way:
00: From the start of file up to (but not including) the line referenced by arg1.
01: From the line referenced by arg1 up to the line referenced by arg2.
.
.
.
n: From the line referenced by argn to the end of file.
If the file argument is a minus (-) then standard input is used. A minus is an ASCII octal 055.
Options-s Suppresses the printing of all character counts. If the -s option is omitted, the command prints the character counts
for each file created.
-k Leaves previously created files intact. If the -k option is omitted, automatically removes created files if an error
occurs.
-fprefix Names the created files prefix00...prefixn. The default is xx00...xxn.
The arguments (arg1...argn) to can be a combination of the following:
/rexp/[offset] A file is created for the section from the current line up to (but not including) the line containing the regular
expression rexp. The current line becomes the line containing rexp. The optional offset is plus (+) or minus
(-) the number of lines. For example, /Page/-5.
%rexp%[offset] This argument is the same as /rexp/[offset], except that no file is created for the section.
lnno A file is created from the current line up to (but not including) lnno. The current line becomes lnno.
{num} Repeat argument. This argument may follow any of the above arguments. If it follows a rexp argument, that argu-
ment is applied num more times. If it follows lnno, the file will be split every lnno lines (num times) from
that point.
Enclose all rexp type arguments that contain blanks or other characters meaningful to the Shell in the appropriate quotes. Regular expres-
sions should not contain embedded new-lines. The command does not affect the original file; it is the user's responsibility to remove it.
Examples
csplit -f cobol file /procedure division/ /par5./ /par16./
This example creates four files, cobol00...cobol03. After editing the files that created, they can be recombined as follows:
cat cobol0[0-3] > file
Note that this example overwrites the original file.
csplit -k file 100 {99}
This example splits the file every 100 lines, up to 10,000 lines. The -k option causes the created files to be retained if there are less
than 10,000 lines; however, an error message would still be printed.
csplit -k prog.c '%main(%' '/^}/+1' {20}
Assuming that follows the normal C coding convention of ending routines with a right brace (}) at the beginning of the line, this example
creates a file containing each separate C routine (up to 21) in
Diagnostics
The diagnostics are self explanatory except for the following:
arg - out of range
This message means that the given argument did not reference a line between the current position and the end of the file.
See Alsoed(1), sh(1)csplit(1)