Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
Nurlan
eepm
Commits
02830158
Commit
02830158
authored
4 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools_estrlist: add has_space function
parent
c074cdf2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
tools_estrlist
bin/tools_estrlist
+15
-2
No files found.
bin/tools_estrlist
View file @
02830158
...
@@ -43,11 +43,23 @@ strip_spaces()
...
@@ -43,11 +43,23 @@ strip_spaces()
echo
"
$*
"
| filter_strip_spaces
echo
"
$*
"
| filter_strip_spaces
}
}
isempty
()
is
_
empty
()
{
{
[
"
$(
strip_spaces
"
$*
"
)
"
=
""
]
[
"
$(
strip_spaces
"
$*
"
)
"
=
""
]
}
}
isempty
()
{
is_empty
"
$@
"
}
has_space
()
{
# not for dash:
# [ "$1" != "${1/ //}" ]
[
"
$(
echo
"
$*
"
|
sed
-e
"s| ||"
)
"
!=
"
$*
"
]
}
list
()
list
()
{
{
local
i
local
i
...
@@ -230,7 +242,8 @@ help()
...
@@ -230,7 +242,8 @@ help()
# echo " reg_wordexclude <list PATTERN> [word list] - print only words do not match PATTERN"
# echo " reg_wordexclude <list PATTERN> [word list] - print only words do not match PATTERN"
echo
" has <PATTERN> string - check the string for a match to the regular expression given in PATTERN (grep notation)"
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
" 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
" isempty [string] (is_empty) - true if string has no any symbols (only zero or more spaces)"
echo
" has_space [string] - true if string has no spaces"
echo
" union [word list] - sort and remove duplicates"
echo
" union [word list] - sort and remove duplicates"
echo
" intersection <list1> <list2> - print only intersected items (the same in both lists)"
echo
" intersection <list1> <list2> - print only intersected items (the same in both lists)"
echo
" difference <list1> <list2> - symmetric difference between lists items (not in both lists)"
echo
" difference <list1> <list2> - symmetric difference between lists items (not in both lists)"
...
...
This diff is collapsed.
Click to expand it.
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