From a66a6d4d3f7da7315feeb693d440b1ce25bd385c Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 20 Oct 2011 08:07:19 +0800 Subject: [PATCH] Made tail and head commands portable --- lib/git/status_shortcuts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git/status_shortcuts.sh b/lib/git/status_shortcuts.sh index 1d00afd..6553201 100644 --- a/lib/git/status_shortcuts.sh +++ b/lib/git/status_shortcuts.sh @@ -25,13 +25,13 @@ git_status_shortcuts() { git status; return 1 fi # Fetch list of files from last line of script output - files="$(echo "$cmd_output" | tail -n 1)" + files="$(echo "$cmd_output" | tail -n1)" # Export numbered env variables for each file local IFS="|" e=1; for file in $files; do export $git_env_char$e="$file"; let e++; done # Print status - echo "$cmd_output" | head -n -1 + echo "$cmd_output" | head -n-1 }