john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Result to variable trim whitespace nested commands instead of pipes

j=$(find $(echo $i | sed 's#AnGST/.#AnGST/#') -name ".txt")

1
2
3
4
5
#!/bin/bash
LOCATION="/home/ubuntu/bin"
RESULT=$($LOCATION/expect-driver.sh username password)
TRIMMEDRESULT=$(sed -e 's/^[[:space:]]*//' <<<"$RESULT")
echo $TRIMMEDRESULT

  • « Iptables ssh vsftpd
  • Expect non interactive ssh login improved vm cmd get vm id »

Published

Dec 27, 2011

Category

linux

~22 words

Tags

  • commands 7
  • instead 2
  • nested 1
  • of 13
  • pipes 1
  • result 1
  • scripts 63
  • to 63
  • trim 1
  • variable 6
  • whitespace 2