Register
It is currently Sat Nov 22, 2014 10:39 pm

Batch print all files in folder


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Mon Oct 04, 2010 10:28 am   

Joined: Mon Oct 04, 2010 10:28 am
Posts: 2
How do you write a bash script that prints all the files in a folder?


Last edited by andrewmin on Mon Oct 04, 2010 2:03 pm, edited 1 time in total.

Top
 Profile  
 PostPosted: Mon Oct 04, 2010 1:13 pm   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
We don't do batch scripts here, so I'll assume you mean bash script.
And to answer your question:
Code:
#!/bin/bash

echo /path/to/folder/*


Top
 Profile  
 PostPosted: Mon Oct 04, 2010 2:04 pm   

Joined: Mon Oct 04, 2010 10:28 am
Posts: 2
Yeah, sorry about that.

And I should probably clarify that I meant actually printing (like, to a printer), not displaying output in the terminal. How does that work, exactly? I tried lprint, but Ubuntu claimed it didn't recognize it as a function when I tried running it.


Top
 Profile  
 PostPosted: Tue Oct 05, 2010 12:10 am   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
In that case you should look into the lp command


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP