Commit 78c2e8d1 authored by Daniel J. Barrett's avatar Daniel J. Barrett
Browse files

add 'pman:' to an output line

parent bc69eb1a
Loading
Loading
Loading
Loading
+1 −1
Changes for chapter10/improving_password_manager/pman-v5: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ load_password () {
    # Place password (field 2) into X primary selection
    echo "$1" | cut -f2 | tr -d '\n' | xclip -selection primary
    # Give feedback to the user
    echo "Found" $(echo "$1" | cut -f3- --output-delimiter ': ')
    echo "$PROGRAM: Found" $(echo "$1" | cut -f3- --output-delimiter ': ')
    echo "$PROGRAM: username and password loaded into X selections"
}

+1 −1
Changes for chapter10/improving_password_manager/pman-v5-clear-clipboard: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ load_password () {
    # Place password (field 2) into X primary selection
    echo "$1" | cut -f2 | tr -d '\n' | xclip -selection primary
    # Give feedback to the user
    echo "Found" $(echo "$1" | cut -f3- --output-delimiter ': ')
    echo "$PROGRAM: Found" $(echo "$1" | cut -f3- --output-delimiter ': ')
    echo "$PROGRAM: username and password loaded into X selections"
    # Launch a background job to clear the password in 30 seconds
    (sleep 30 && echo -n | xclip -selection primary) &