Hey all, a relative bash/script newbie trying solve a problem.
I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like
2007-11-03... (3 Replies)
Hello friends!
Each line of my input file has this format:
word<TAB>tag1<blankspace>lemma<TAB>tag2<blankspace>lemma ... <TAB>tag3<blankspace>lemma
Of this file I need to eliminate all the repeated tags (of the same word) in a line, as in the example here below, but conserving both (all) the... (2 Replies)
Hello guys,
should be a very easy questn for you:
I need to delete strings in file1 based on the list of strings in file2.
like file2:
word1_word2_
word3_word5_
word3_word4_
word6_word7_
file1:
word1_word2_otherwords..,word3_word5_others... (7 Replies)
I am completely new to shell scripting but have been assigned the task of creating several batch files to manipulate data. My final task requires me to find lines that have duplicates present then delete not only the duplicate but the original as well. The script will be used in a windows... (9 Replies)
Hi ALL
I need a help
I need to retain only the first line of 035 if I have two line before =040 , if only one then need to take that
Eg:
Input
=035 (ABC)12324141241
=035 (XYZPQR)704124
=040 AB$QS$WEWR
=035 (ABC)08080880809
=035 (XYZPQR)9809314
=040 ... (4 Replies)
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
I need help in figuring out hoe to delete lines in a data file. The data file is huge. I am currently using "vi" to search and delete the lines - which is cumbersome since it takes lots of time to save that file (due to its huge size).
Here is the issue. I have a data file with the following... (4 Replies)
Hi guys, I wonder if it's possible to search for a line containing 2 strings and delete that line and perhaps replace the source file with already deleted line(s).
What I mean is something like this:
sourcefile.txt
line1: something 122344 somethin2 24334 45554676
line2: another something... (6 Replies)
Hello All !
I need your help on this case,
I have a csv file with this:
ITEM105;ARI FSR;2016-02-01 08:02;243
ITEM101;ARI FSR;2016-02-01 06:02;240
ITEM032;RNO TLE;2016-02-01 11:03;320
ITEM032;RNO TLE;2016-02-02 05:43;320
ITEM032;RNO TLE;2016-02-01 02:03;320
ITEM032;RNO... (2 Replies)
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Discussion started by: sajmar
4 Replies
LEARN ABOUT HPUX
aclsort
aclsort(3C)aclsort(3C)NAME
aclsort() - sort an Access Control List (JFS File Systems only)
SYNOPSIS DESCRIPTION
The routine sorts JFS Access Control List (ACL) entries into the correct order to be accepted by the acl(2) system call.
points to a buffer containing ACL entries; if non-zero, indicates that the permissions should be recalculated; and specifies the number of
ACL entries in the buffer.
sorts the contents of the ACL buffer as follows:
Entries will be in order and
Entries of type and will be sorted in increasing order by numeric ID.
The call will succeed if all of the following are true:
There is exactly one entry each of type and
There is at most one entry each of type and
Entries of type or may not contain duplicate entries. A duplicate entry is one of the same type containing the same numeric id,
irrespective of permission bits.
If the argument is zero and there are no entries of type and no entries of type the permissions of the and entries must be the same.
If there are no entries of type and no entries of type and the entry is specified, then the entry must also be specified, and the
permissions of the and entries must be the same.
RETURN VALUE
Upon successful completion, the return value is 0. If there are duplicate entries, the return value is the position of the first duplicate
entry. If there is more than one entry of type or they are treated as duplicate entries, and the return value is the position of the first
duplicate entry. For all other errors, the return value is -1.
NOTICES
The buffer is sorted by type and ID before checking for any failures. Therefore the buffer is always sorted, even if there is a failure.
The position of a duplicate entry returned on failure is not the byte offset of the duplicate entry from its base; rather it refers to the
entry number of the duplicate entry within the sorted buffer.
Checks will be performed in order of entry type. If there are multiple failures, the failure returned will be the first encountered, for
example, if the ACL buffer contains a duplicate entry and does not contain an entry, the return value will be the first duplicate entry.
ACLs do not have to be sorted with prior to passing them to acl(2).
DEPENDENCIES
is supported only on JFS file systems on the standard HP-UX operating system.
AUTHOR
was developed by AT&T.
SEE ALSO acl(2), aclv(5).
aclsort(3C)