General :: Printing File Name , When Using Awk?

Jul 12, 2011

i am going throw all files in directory and want to print the files that having more than 1 "%" in their content...what should i exchange in BOLD?

for file in * ;
do awk -F'(%)' '{ t += (NF - 1) } END
{if (t>1) print $file ;}'
$file;done

View 4 Replies


ADVERTISEMENT

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

General :: Error In Printing A File?

Jun 7, 2011

I am trying to print a ps file through code using cupsPrintFile..The code is as follows:

Code:

#include <cups/cups.h>
#include<stdio.h>
int main()
{

[Code]....

View 5 Replies View Related

General :: Variables In Text File - How To Get Values When Printing Out

Apr 13, 2010

I'm doing some bash-scripting and want to be able to print some text (just plain text) files into the new bash-scripts, created within a loop. Here's a short example of what I do:

Code:
# main bash script #
#!/bin/bash
##Filename
variable1=10
for ((j=0;j<=40;j+=1))
do
## Create another bash-script
echo "#!/bin/bash" >> bash_script_$j
... some stuff...
cat file1.txt >> bash_script_$j
... some more stuff...
done
where the text file (file1.txt) I want to print in the the new bash script looks something like:

Code:
# file1.txt #
...some stuff...
logsave log some_program($variable1)
mv output_$j folder_$j/
... some more stuff...

I.e, the text file contains variables such as "$j", "$variable1" etc that are undefined. Doing the above works for creating new bash scripts (bash_script_1 - bash_script_40) but the variables are not determined. I would like, if possible, to somehow print the text in file1.txt into the new bash-scripts with the variables determined, i.e:

Code:
# bash_script_1 #
...some stuff...
logsave log some_program(10)
mv output_1 folder_1/
... some more stuff...

The text files I read are quite extensive so I would really prefer not having to paste them into the FOR-loop directly.

View 2 Replies View Related

General :: Selecting A Font When Printing A Text File From The Command Line?

Jul 29, 2011

I don't understand why this is so difficult.In the old days, there was lpforms which allowed some formatting. CUPS did not see fit to implement this into it's lp package.cgi-...-cgi?lpforms+1In the old days, lpr allowed you to select a font in the command line with -1=fontname. CUPS did not see fit to implement this into it's lpr package.htmIn the old days, printers had fonts installed on them that you could access. Modern printers don't seem to have this. So now I still need to be able to select a font when I print certain text files from the command line but it seems this is impossible. I've been working with instances and lpoptions, which allows me to do a lot of other things I need like orientation and margins and even set the font size, but I still cannot choose a font other than the default.

View 2 Replies View Related

General :: Cups Spooler Quits Printing Large Print File?

Mar 22, 2010

I have installed centos 5 and can print small to medium lpr files using cups fine (1 to 20 pages), but when i tried to print a file of 95 pages the printer just stops, I have to power off the printer and turn it back on and it will start printing again. It looks like some data is lost in this process. It may print 20 pages and stop. When restarted it may print 20 or 40 or complete the report.I can print to the devicectly and it works fine. It is only when the large print jobs are run through the spooler.I have tried on different printers and the same results, that's what makes me think it is a spooler problem.

View 2 Replies View Related

Hardware :: Printing Raw From A File?

Nov 3, 2010

I am in the process of writing a script to prints prerinting on different printers in a way that directly sends a raw file to the usb lp device file. Kind of like printing to a prn file in windows. Is there any way to accomplish this in linux (i.e. prepare the files before with a print driver and filter then to a raw send?

View 2 Replies View Related

Ubuntu :: Printing To File Tweaks?

Sep 3, 2010

I'm doing a lot of print to file and selecting pdf. It is an awesome feature. But I'd like to add a location to the "Save in folder" drop down menu. What would be better is to add a location, and then make it the default location. It would also be awesome to change the default from .ps to .pdf. This would greatly speed up my save to file process.

View 2 Replies View Related

Programming :: Printf Is Printing To The File?

May 10, 2011

Id like to share with you a strange behavior I�ve been seen with the printf C language function running in Fedora.The code opens a file as showed:descString = fopen( strcat( stringName, txt), a+);There are also some printf functions in the code.However, instead of the printf functions to print their content at the screen, theyve been printing them in the file with the descString file descriptor.Have you ever seen something like that?To print something to the file I use the fprintf function. I didn't make a mistake to confuse printf with fprintf. I'm sure.

View 2 Replies View Related

Debian Multimedia :: Printing A Pdf File Fails?

May 23, 2011

System : Debian squeeze, Gnome, amd64Printer : Samsung ML-1640 SeriesDriver:Samsung ML-1640, SpliX V. 2.0.0Printer works, but printing a pdf file from evince fails ( nothing is printed )...http://localhost:631/jobs/ shows : "/usr/lib/cups/filter/pdftoraster failed

View 12 Replies View Related

Ubuntu :: Cups-pdf Printing No Extension On File?

Apr 24, 2010

I am running 10.04 beta2 and have installed cups-pdf printing. I can print to the PDF printer and it works fine saving the file to ~/PDF. It saves it with the PDF extension as expected. I am trying to save the file by default to a windows share. I changed the DEVICE URI line to smb://HOME/SERVER/PDF. When I print, the job shows up on the windows share but without a PDF extension

View 8 Replies View Related

Programming :: Printing A Specific Word Out Of A File?

Jan 6, 2011

so i have a file that has the following

file1.txt
ID1 age_11 dog_n3 parent_dog_n1
ID1 age_7 dog_n4 parent_dog_n3
ID1 dog_n5 age_4
ID1 dog_n6 age_4

[Code].....

As you can see i would like the output file to be just the dogs, not the otehr information. But because the information is mixed up how can i extract only the dogs? (i cant do and awk '{print }' because the dogs are found in colounm 2 or 3 or sometimes even 4.

View 9 Replies View Related

Programming :: Printing Text From An External File In C?

May 24, 2010

I was reading through the source code of adventure in the bsdgames package and I had noticed that most of the text is read from a file called glorkz. I'm wondering about what function/technique the author used to print from the file; I've been looking through the code for a while (particularly io.c) and I haven't been able to figure it out.

View 3 Replies View Related

Hardware :: Continuos Printing - Stop Ejecting The Paper After Printing Over?

Jul 28, 2010

We developed qt based application in linux. I wish to stop ejecting the paper after printing over.How to do it.

View 2 Replies View Related

Ubuntu :: Printing With Exact Size Photos And With Poor Auto Colour Printing But The Situation Remains Unchanged

May 31, 2010

I expected more from ubuntu 10.4 with regards to printing with exact size photos and with poor auto colour printing but the situation remains unchanged! for instance .. the photo size configurations for ubuntu/fspot/gimp and others are not compatible with my printers (HP and Brother) .. here in Europe a typical standard size photo (10x15inches or 150x100mm are not even on the Ubuntu listing? I have tried all listed possibilities including "custom" (which does not seem to ever work correctly?)and the result at best is photos with uneven boarders or at worse my printer goes a bit crazy with much wasted photo paper and expensive ink ...even photos selected for "no boarders" still produces photos with the self same uneven boarders.

I have tried pretty much everything over time following advice in this forum and including using HPlip and updating drivers required for my Brother printer but the root problem seemingly lies with the Ubunto photo size setup listing. Working with Ubuntu over the years I have found that it can do pretty much everything that Windows can do except for this dam ongoing photo quality and configuration problem.

View 9 Replies View Related

Ubuntu :: Edit The Ppd File - Full Page Printing ?

Sep 1, 2011

I would like to print full page on a HP Deskjet F4280 using any kind of software (GIMP for example).

I tried to edit the printer ppd file, turned hardware margins off in the print properties in GIMP, yet when I try to print an image 8.5 in wide on letter size paper, GIMP still leaves approx. 1/8in gap on the paper edge.

The printer hardware can do it: when I simply use the copy function it can print to the very edge of the paper.

Question: does anybody know how I need to edit the ppd file (or other config files) to convince GIMP (or other programs) to print using the full page?

View 4 Replies View Related

Software :: Printing Specific Lines Of File Using Script

May 19, 2009

I have text file with say 1000 lines.And I want to display lines numbered 100, 203 and 297 using a script/ command.How can I do this ?I can print a particular line using:sed -n '100p' file1 (where file1 is input file).

View 6 Replies View Related

OpenSUSE Hardware :: Printing System Continuously Prints Same File?

Apr 1, 2010

I made a BIG mistake and tried to print a PDF document from Evince 2.28.2. Evince sends a garbage filled print job to the queue that results in nothing but garbage being printed. I noted the problem an tried to kill the print job but could not because it does not show up in the print queue. It appears that the printer sent an error back to the print system and the print system now continues to print the job forever - that is, anytime openSUSE is running, even after reboots.

Note that printing the test page works and that the printer also works fine with gedit and OpenOffice.

If I go to Control Center -> Printing then right click on the icon for the printer and click View Print Queue, the print queue is empty.

In YaST Control Center -> Printer -> Policies the "Specify error policy" is set to "abort and delete the job and proceed with the next job." The "Apply this error policy to all local printer configurations" checkbox was checked when this policy was set. If this is what should have ultimately killed the job it did not work.

how to stop the print system from trying to print this garbaged print job. It has been trying to print the same garbaged print job for the last five days!

View 7 Replies View Related

Networking :: Make PC Ping Each Other - File Sharing And Printing Setup

Jan 26, 2010

I have a Netopia 3000 Series Internet Gateway [URL] & windows 7(laptop) & ubuntu 9.10.
- My laptop connects to it wireless and my ubuntu via ethernet cable.
- I am trying to setup file sharing and printing. How do I go about in making them ping each other? the networking side.
I logged in the router & check and windows has ip 192.168.100 & ubuntu has 192168.1.2

View 2 Replies View Related

Debian Hardware :: Printing Error - Can't Copy Stdin To Temporary File

Jan 5, 2015

My printer has stopped working.

1. I am unsure if any system changes have occured. I am sure I must have changed something, but apparently did not document it.
2. Printer does work from other computers
3 Computer was originally wireless connected, but switched to USB. This had no affect. Well I can scan now so great.
4, Printer is HP 6500a.
5. Printer has worked from this computer before
6 This is from cups error log:

D [05/Jan/2015:11:47:48 -0500] [Job 147] Set job-printer-state-message to "Can't copy stdin to temporary file", current level=ERROR
D [05/Jan/2015:11:47:48 -0500] [Job 147] prnt/hpcups/HPCupsFilter.cpp 536: cupsRasterOpen failed, fd = 0

View 7 Replies View Related

Fedora Networking :: Network To Lan - For File Sharing - Printing And Internet Access

Dec 30, 2009

I have a wired lan at home with 2 XP boxes connecting to a router to a DSL modem. I want to network my laptop, running only fedora os, for file sharing, printing and internet access. I will be using the laptop probably exclusively for creating/maintaining a Drupal-based (LAMP) e-commerce site to replace our old one for our small family business.

View 4 Replies View Related

Slackware :: Can't Print - "Unable To Open Image File For Printing!"

Jan 18, 2011

Since slackware 13.0 (upgraded to 13.1), I haven't been able to print anything. I can add printers no problem using the cups gui (or whatever). However any print I send to any printer fails because of:

"Unable to open image file for printing!"

I can post the whole error log if that helps, but I can't see much in it. I haven't been able to print for about 6 months, which is getting a bit annoying.

p.s, as a I lazy option I upgraded to the cups in -current, but that didn't help (although I don't think it was a very different version).

View 7 Replies View Related

General :: Firefox 3.6 Not Printing By Cups

Feb 1, 2010

I cannot print form firefox 3.6 form linux suse 11.2. All the rest is printing. Piece form error log off cups

D [01/Feb/2010:19:52:00 +0100] [Job 62] page 2 1
D [01/Feb/2010:19:52:00 +0100] Discarding unused job-progress event...
D [01/Feb/2010:19:52:01 +0100] [Job 62] successfully sent print file, 24. packet, 65536 bytes (1536KB) ...
D [01/Feb/2010:19:52:02 +0100] [Job 62] successfully sent print file, 25. packet, 65536 bytes (1600KB) ...
D [01/Feb/2010:19:52:03 +0100] [Job 62] successfully sent print file, 26. packet, 65536 bytes (1664KB) ...
D [01/Feb/2010:19:52:05 +0100] [Job 62] successfully sent print file, 27. packet, 65536 bytes (1728KB) ...
D [01/Feb/2010:19:52:06 +0100] [Job 62] successfully sent print file, 28. packet, 65536 bytes (1792KB) ... .....
D [01/Feb/2010:19:52:08 +0100] Discarding unused printer-state-changed event...
D [01/Feb/2010:19:52:08 +0100] Discarding unused job-completed event...
D [01/Feb/2010:19:52:09 +0100] [Job 62] Unloading...

View 6 Replies View Related

General :: Configure Printing Using The C652_SERIES_LINUX_v3?

Feb 16, 2010

I have unzipped a Konica Minolta file at: [URL] I currently have it stored in a CUPS folder, unfortunately it is in my home directory. I am running 9.10 Ubuntu on a Dell latitude D830. Whats the correct path to install the CUPS folder so I can actually get something to print? Oh, and i am trying to get on a printer at work that is networked. i have full admin privileges as an Ubuntu user, but I am missing something really big. See posts below.

Currently I have tried: sudo mv /home/angela/CUPS1.1/English/KOC652UX.ppd /usr/share/ppd/openprinting/ without success even when restarting the computer.

View 3 Replies View Related

General :: Printing Addresses On Envelopes?

Nov 18, 2010

I almost never boot windows anymore - but there is one thing I miss

In msword I was able to print addresses on envelopes and/or labels

I have not found that capacity on fedora 13 with Abiword and Open Office writer

Is it there seomwhere?

View 4 Replies View Related

General :: Printing Data In An Ip Packet?

Oct 6, 2010

Currently i am working with linux code. I need help in printing data in ip packet. In my program i am defined the headers and defined ip packets. But I am having problems with printing data in the ip. I am thinking that for loop has to be used, but what parameters to use

View 2 Replies View Related

General :: Printing Single Quotes With Awk?

Jul 27, 2011

I have the following command, which works fine:ll /backup/PROD |grep PROD_ |awk -F" " '{print "catalog backuppiece /backup/PROD/"$9";"}'The output is:catalog backuppiece /backup/PROD/PROD_29mi42vn_1_1;BUT... I want single quotes in the result. One before /back.. and one before the ;Like this:catalog backuppiece '/backup/PROD/PROD_29mi42vn_1_1';How do I do that? I tried using ' but it does not work.The following command works, but I get an error message, which prevents me from using the command in a bash file:ll /backup/PROD |grep PROD_ |awk -F" " '{print "catalog backuppiece '''/backup/PROD/"$9"''';"}'awk: warning: escape sequence `'' treated as plain `''

View 3 Replies View Related

General :: No Printing With Canon IP1800

Feb 27, 2011

I am brand new to Ubuntu (1 day). I can find my way round most things but I can't print to my Canon Pixma. I have tried to download Australian drivers from a 2007 thread but when I try to download I get the error message "wrong architecture i386". My computer uses an AMD Athlon IIx3 processor. When I say can't print, the file goes into a print queue but the printer does not respond at all. I can see the printer when I go into system, admin, printing.

View 14 Replies View Related

General :: Printrex 812 - Can't Set Up Printing From This Creature?

May 11, 2010

I need to set up the Printrex 812 under linux, but i can't find any ppd files for it. It can print plain text files in raw mode, but can't print ps or other formats.I can't find anything for that printer for linux. On their website is only drivers for win.

View 1 Replies View Related

General :: Printing Pdf With Okular Or With Acroread

Mar 21, 2011

First of all I must admit that I am quite new with linux, and maybe the problem I am experiencing is something trivial. Nevertheless I don't have any idea about how to handle it. When I try to print a file with Okular or with Acroread what happens is that the applications crashes and I have to terminate it, and the file is not printed.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved