lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/32] ver_linux: assign the usage message to a variable and print it
Date
This patch assigns the usage message to a 'usage' variable and prints it.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
scripts/ver_linux | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 30ecc6c..2f1d494 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -4,9 +4,10 @@
# /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
# differ on your system.

-echo 'If some fields are empty or look unusual you may have an old version.'
-echo 'Compare to the current minimal requirements in Documentation/Changes.'
-echo ' '
+BEGIN {
+ usage = "If some fields are empty or look unusual you may have an old version.\n"
+ usage = usage "Compare to the current minimal requirements in Documentation/Changes.\n"
+ print usage

uname -a
echo ' '
--
2.7.3
\
 
 \ /
  Last update: 2016-06-28 13:01    [W:0.228 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site