Thread: Shell Script Logical And Problem
i'm new shell scripting , think i'm misunderstanding logical and. think comment in script should explain i'm trying do.
here's script:
the file prints ~/.pdf properly,code:#! /bin/sh # prints file pdf , moves current directory # 'lppdf file' print file pdf , move current directory ########################################################################## # set-up: sudo apt-get install cups-pdf # mkdir ~/.pdf # go /etc/cups/cups-pdf.conf , change out ~/.pdf ########################################################################## name=`basename "$1"` new_file="${name}.pdf"; lpr -p pdf $1 && mv ~/.pdf/$new_file .
error get:code:neal@neal-laptop:/home/neal/.pdf $ dir testfile.pdf
clearly, mv not waiting lpr finish. need file print , want move current directory. doing wrong?code:$ lppdf testfile mv: cannot stat `/home/neal/.pdf/testfile.pdf': no such file or directory
more info: used work. see final post here: http://ubuntuforums.org/showthread.php?t=1353612
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [SOLVED] Shell Script Logical And Problem
Ubuntu
Comments
Post a Comment