[kexec-tools/f19] kdump-lib.sh: add common function strip_comments
Baoquan He
baoquan at fedoraproject.org
Fri Sep 27 11:07:53 UTC 2013
commit f036d1ebb8a5fa340ea1e36750a15f64d8aac60b
Author: Baoquan He <bhe at redhat.com>
Date: Thu Sep 26 19:35:59 2013 +0800
kdump-lib.sh: add common function strip_comments
Add function strip_comments into kdump-lib.sh, since it's used by
several files.
Signed-off-by: Wade Mealing <wmealing at redhat.com>
Signed-off-by: Baoquan He <bhe at redhat.com>
Acked-by: Vivek Goyal <vgoyal at redhat.com>
kdump-lib.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 1d00f67..4df5315 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -17,3 +17,8 @@ is_raw_dump_target()
{
grep -q "^raw" /etc/kdump.conf
}
+
+strip_comments()
+{
+ echo $1 | sed -e 's/\(.*\)#.*/\1/'
+}
More information about the scm-commits
mailing list