Skip to content
Snippets Groups Projects

remove grep: warning: stray \ before white space

Merged Hahn Axel (hahn) requested to merge 5823-grep-regex-with-spaces into master
11 files
+ 28
18
Compare changes
  • Side-by-side
  • Inline

Files

@@ -7,10 +7,11 @@
@@ -7,10 +7,11 @@
# included by ../check_packages2install
# included by ../check_packages2install
#
#
# ---------------------------------------------------------------
# ---------------------------------------------------------------
# ah <axel.hahn@iml.unibe.ch>
# ah <axel.hahn@unibe.ch>
# 2022-06-03 v1.0 ah first version
# 2022-06-03 v1.0 ah first version
# 2022-06-07 v1.1 ah remove text "Nothing to install"
# 2022-06-07 v1.1 ah remove text "Nothing to install"
# rename functions
# rename functions
 
# 2022-10-21 v1.3 ah remove grep: warning: stray \ before white space
# ===============================================================
# ===============================================================
@@ -32,7 +33,7 @@ function apt.getPackageList(){
@@ -32,7 +33,7 @@ function apt.getPackageList(){
if [ $iStart -gt 0 ]; then
if [ $iStart -gt 0 ]; then
# show packages = text starting with 2 spaces below start line
# show packages = text starting with 2 spaces below start line
# packages are delimited with space -> replace with new line
# packages are delimited with space -> replace with new line
echo "$packagemanOut" | sed -n $iStart,\$p | grep "^\ \ " | sed "s#^\ \ ##g" | tr " " "\n"
echo "$packagemanOut" | sed -n $iStart,\$p | grep "^ " | sed "s#^\ \ ##g" | tr " " "\n"
fi
fi
}
}
Loading