changeset 8628:83a25804a4c6

<shachaf> mkx bin/cmd//cut -d "" -f 3 < /proc/${1-$PPID}/cmdline
author HackBot
date Tue, 28 Jun 2016 00:14:19 +0000
parents b5f7534a43e6
children 988ca3711b2e
files bin/cmd
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bin/cmd	Tue Jun 28 00:05:54 2016 +0000
+++ b/bin/cmd	Tue Jun 28 00:14:19 2016 +0000
@@ -1,3 +1,1 @@
-#!/bin/bash
-pid="$PPID"
-[ -n "$1" ] && pid="$1"; cut -d "" -f 3 < /proc/$pid/cmdline
+cut -d "" -f 3 < /proc/${1-$PPID}/cmdline