Skip to main content

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:
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 .
the file prints ~/.pdf properly,
code:
neal@neal-laptop:/home/neal/.pdf  $ dir testfile.pdf
error get:
code:
$ lppdf testfile mv: cannot stat `/home/neal/.pdf/testfile.pdf': no such file or directory
clearly, mv not waiting lpr finish. need file print , want move current directory. doing wrong?

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

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'