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
88654461
Commit
88654461
authored
Jul 22, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
estrlist: add isempty
parent
2847f894
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
estrlist
bin/estrlist
+9
-1
No files found.
bin/estrlist
View file @
88654461
#!/bin/bash
# 2009-2010, 2012 Etersoft www.etersoft.ru
# 2009-2010, 2012
, 2017
Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
...
...
@@ -37,6 +37,11 @@ strip_spaces()
echo
"
$*
"
| filter_strip_spaces
}
isempty
()
{
[
"
$(
strip_spaces
"
$*
"
)
"
=
""
]
}
list
()
{
local
i
...
...
@@ -173,6 +178,7 @@ help()
echo
" reg_wordexclude <PATTERN> [word list] - print only words not matched with PATTERN"
echo
" has <PATTERN> string - check the string for a match to the regular expression given in PATTERN (grep notation)"
echo
" match <PATTERN> string - check the string for a match to the regular expression given in PATTERN (egrep notation)"
echo
" isempty [string] - true if string has no any symbols (only zero or more spaces)"
echo
" union [word list] - sort and remove duplicates"
echo
" uniq [word list] - alias for union"
echo
" list [word list] - just list words line by line"
...
...
@@ -186,6 +192,8 @@ help()
example reg_wordexclude
"wo.* er"
"work were more else"
example union
"1 2 2 3 3"
example count
"1 2 3 4 10"
example_res isempty
" "
#example_res isempty " 1 "
example_res has ex
"exactly"
example_res has exo
"exactly"
example_res match
"M[0-9]+"
"M250"
...
...
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