Forums Search Login Register
Login
Username
Password
New Posts Todays Posts Find Users Posts Unanswered Threads Help Mark Forums as Read

Thread Options  Subscribe to this thread Subscribed Users  Add Reply 
Posts: 1,349
Trophies:
1
hello,

i'm always trying to do as most as possible via bash scripting, although i have to ask a lot of help here on the forum; (great thank you)

well i have a bash script for printing pdf's in a directory (2 pages per sheet, duplex, fit to page)

#!/bin/bash
for file in *.pdf do lp -o media=a4 -o number-up=2 -o fit-to-page -o sides=two-sided-long-edge "$file" done

i got 2 questions:

1)how can i modify the script to print everything in a directory (say: work) (included all pdf's in directories under the directory work: for example /work/monday/ ) is it possible to first search all pdf files with the find command and then feed them into de existing script ? that way i could automate a lot of scripts

2)is it possible to print to a new pdf file; something like an automated pdftk; i suppose again with the find command coupled with the pdftk i could get there.

thanks guys and ladies
03-11-2013, 07:29 PM
Reply
Subscribe to this thread Subscribed Users  Add Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How make BASH on Ubuntu 20.04 ... joaltun85 0 17 08-26-2020 10:23 PM
Last Post: joaltun85
  [SOLVED] BASH: Sox batch processing basementlivinguk 2 430 03-12-2020 08:35 PM
Last Post: FrankJScott
  Question about Startup Applications and Bash script orders gandalou1 0 195 09-05-2018 10:32 PM
Last Post: gandalou1
  [ubuntu] Redirect stderr of timeout in bash uleilarosariog 0 142 05-29-2018 08:19 AM
Last Post: uleilarosariog
  [ubuntu] BASH help needed Shiney 0 171 05-16-2018 01:10 PM
Last Post: Shiney
  [ubuntu] Auto restart terminal and bash script request Hoppytramp 0 192 02-01-2018 10:15 PM
Last Post: Hoppytramp
  Sending a command to a remote Ubuntu box to run a bash script MarvinR1935 0 185 01-21-2018 11:44 PM
Last Post: MarvinR1935
  Running Bash Scripts rstefaniacoxa 0 318 09-16-2016 11:01 AM
Last Post: rstefaniacoxa
  Bash scripts and Linux? I have absolutely no clue :( AvyeC1990 0 403 02-19-2014 02:10 AM
Last Post: AvyeC1990
  [xubuntu] remote connecting vnc bash autocomplete don't working JerrieKasica 0 385 02-17-2014 01:26 PM
Last Post: JerrieKasica

Forum Jump:



User(s) browsing this thread: 1 Guest(s)



Contact Us Privacy Policy Top RSS
Forum Software By: MyBB, © 2002-2020