Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
5e7712cd
Commit
5e7712cd
authored
Feb 21, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
estrlist: add uniq alias
parent
6574eec2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
estrlist
bin/estrlist
+8
-1
No files found.
bin/estrlist
View file @
5e7712cd
...
...
@@ -56,6 +56,10 @@ union()
list
$@
|
sort
-u
}
uniq
()
{
union
$@
}
# remove_from_list "1." "11 12 21 22" -> "21 22"
reg_remove
()
...
...
@@ -116,6 +120,7 @@ help()
echo
"exclude <list1> [list2] - print list2 words contains also in list1"
echo
"reg_exclude <PATTERN> [word list] - print only words not matched with PATTERN"
echo
"union [word list] - sort and remove duplicates"
echo
"uniq [word list] - alias for union"
echo
"list [word list] - just list word by line"
echo
"count [word list] - print word count"
echo
...
...
@@ -143,9 +148,11 @@ if [ "$COMMAND" = "-h" ] || [ "$COMMAND" = "--help" ] ; then
fi
shift
# FIXME: do to call function directly, use case instead?
if
[
"
$1
"
=
"-"
]
;
then
shift
"
$COMMAND
"
"
$(
cat
)
"
"
$COMMAND
"
"
$(
cat
)
$@
"
else
"
$COMMAND
"
"
$@
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment