Assuming we have say 4 occurrences of the same ID and want to combine the end of ID 4 with the beginning of ID4, the beginning of ID 3, and the beginning of ID 2, but not with the beginning of ID1. How can this be done?
Basically, the combinations should look like this.
input:
the output should look like this:
I am trying to do something like this but not sure how to print all of these combinations
In a file a pattern is occured many times randomly. Even it may appear more then once in the same line too. How i can get the number of times that pattern appeared in the file? let the file name is abc.txt and the pattern is "xyz".
I used the following code:
grep -ic "xyz" abc.txt
but it is... (3 Replies)
Hello,
Actually i want to replace the word after a matched pattern.
For Ex:
lets say that i am reading a file line by line
while read line
do
echo $line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example :... (1 Reply)
Hi,
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
BEGIN {
$pattern or
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
would like to print word between matched patterns using sed
for example :
create INDEX SCOTT.OR_PK ON table_name(....)
would like to print between SCOTT. and ON which is OR_PK
Please help me out
Thanks (4 Replies)
Hi,
I have script like below:
#!/usr/local/bin/perl
use strict;
use warnings;
while (<DATA>) {
( my ($s_id) = /^\d+\|(\d+?)\|/ ) ;
if ( $s_id == 1 ){
s/^(.*\|)*.*ABC\.pi=(+|+)*.*ABC\.id=(\d+|+).*$/$1$2|$3/s;
print "$1$2|$3\n"; (2 Replies)
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Hi,
I need to extract an info in $1 based on a matched pattern in $2,$3,$4, and $5.
The sample input file as follows:-
ID Pat1 Pat2 Pro1 use1
add41 M M M
add87 M M M M
add32 ... (16 Replies)
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
I have two files say FILE1 and FILE2.
FILE1 contains 80,000 filename in sorted order and another file FILE2 contains 6,000 filenames is also in sorted order.
I want to compare the filename for each file and copy them in to a folder when filename is matched.
File1.txt contain 80,000... (8 Replies)
Discussion started by: imranrasheedamu
8 Replies
LEARN ABOUT XFREE86
labelit_ufs
labelit_ufs(1M) System Administration Commands labelit_ufs(1M)NAME
labelit_ufs - provide and print labels for ufs file systems
SYNOPSIS
labelit -F ufs [generic_options] special [ fsname volume]
DESCRIPTION
labelit is used to write labels on unmounted disk file systems. Such labels may be used to uniquely identify volumes and are used by vol-
ume-oriented programs such as volcopy(1M).
OPTIONS
The following option is supported:
generic_options options supported by the generic labelit command. See labelit(1M).
OPERANDS
The following operands are supported:
special name should be the physical disk section (for example, /dev/dsk/c0d0s6). The device may not be on a remote machine.
fsname represents the mount point (for example, root, u1, and so on) of the file system.
volume may be used to represent the physical volume name.
If fsname and volume are not specified, labelit prints the current values of these labels. Both fsname and volume are limited to six
or fewer characters.
EXIT STATUS
The following exit values are returned:
0 Write or display of labels was successful.
non-zero An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO labelit(1M), volcopy(1M), attributes(5), ufs(7FS)SunOS 5.10 15 Apr 2003 labelit_ufs(1M)