#!/bin/bash
# Usage:
# spwd will get the path for ./ , printed in ssh remote path format
# spwd PATH/FILE LIST will get the path for each path or file , printed in ssh remote path format
NAMELOST=""
if [ $# -eq 0 ]; then
NAMELIST="./"
else
NAMELIST=$@
fi
PROFILE=`whoami`@`host \`hostname\` | awk '{print $NF}'`
for NAME in $NAMELIST; do
echo $PROFILE":"`readlink -f $NAME`
done