Ubuntu :: Print To PDF From Command Line

Jul 11, 2011

I am trying to find a way to print PDFs from the command line. I was using "cups-pdf', but I want to be able to specify the output folder from the command line. Is there a way to do this? I guess what I am trying to do is the Gnome "Print to file" option in the terminal so I can easily print off a batch of file to whatever directory I wanted.

View 4 Replies


ADVERTISEMENT

Ubuntu :: Use Multiple Cut Command To Print Output On A Line?

Apr 27, 2010

how to use multiple linux cut comman to display on same line ?

e.g ls -il | cut -f6 d:
ls - il cut -f9 -d:

The linux script output is

filename
123

How to use cut to display on same line ?

View 1 Replies View Related

Programming :: Using An Awk Command To Print A Line From A Cvs File?

Mar 4, 2011

I am using an awk command to print a line from a cvs file.the awk command includes an if statement that filter the output-lets say i want to print all the lines that the price field is greater than 30.i have it working when i put the parameters myself.. but when i try to send them with vars it wont work..i am sending the sign of the if statement - can only be: == , < , >it looks like this:

cat file.csv | awk -v sign=">" -v field="2000" '{if($3 sign field) printf "%-12s%-12s%-12s%-12s
",$1,$2,$3,$4}' FS=,

the bold part is the problem , because when i put the sign parameter myself t works great.. i guess its a chars issue but i cant spot it

View 3 Replies View Related

CentOS 5 :: Printer In GUI Can Print Fine From The Command Line

Oct 6, 2009

I work at The University of Alabama as a sysadmin on various HPC resources and also provide support for faculty using Unix systems. I've run into one problem that is affecting two different desktop systems running CentOS 5.3.oth of these systems have the latest updates. These machines have standard network-attached printers. One is an HP LaserJet 3250 and the other is a model that is pretty close to that one.Previously these users were able to print from graphical applications such as Firefox, but now when the print dialog is opened on ANY graphical application, it causes a hard freeze on that particular app.Printing from the commandline via `lpr` gives no issues and test pages from the Printer Admin interface also succeed.This problem has me stumped, so I'm looking for any insight as to what could have changed. I do not know what changed between the time when the printers worked graphically and when they stopped, but the users assure that they have changed no settings. The only thing I can suspect is a rogue update since this is affecting separate users on separate machines with separate printers.

View 4 Replies View Related

General :: Tail Command Syntax To Print A Sequence Of Line ?

Dec 21, 2010

How to print a sequence of line say line number 10 to 20 of a 50 line file ?

View 6 Replies View Related

Programming :: Print Images From Command Line At A Specific Size

Jan 7, 2010

I have a requirement to print images (two to be precise) from the command line of a given size and without losing too much quality.

So, I may have two images, a.jpg and b.jpg which may be 4x4" and 6x4" respectively (the sizes may vary). I need to be able to print both these on a single sheet of paper (one under the other) at a given size for each - so a may be 2x2" and b may be 3x2" - the aspect ratio will always be maintained (or as near as possible!)

I am currently doing this a very messy way (because I don't know any other way!!) - basically I am converting the picture to a given size using a set density using convert and then concatenating the two using montage.

Here is part of my script:

Code:

Don't worry too much about the case statement at the end - that is just to be able to select to print either A, B or A and B.

The issue with this is that is doesn't work great if the aspect ratio is not maintained perfectly and also, it loses quite a lot of quality on the print.

I have a very old windows app which I wrote years back in VB (o dear! ) which does the same thing and the quality is fine (I am running it through wine). I want it to be command line though because I want to run it as part of other scripts etc.

View 4 Replies View Related

General :: Command Line - Print A Group Of Text Matching A Regex?

Sep 22, 2011

I'd like to print only few groups from text matching a regex. How can I do that in the Linux command line?

What other tools for text processing are there in Linux?

View 3 Replies View Related

General :: Printing From Command Line Won't Work - Just Sits In Print Queue

Apr 3, 2011

CUPS was not originally installed on my server, I have installed it but cannot print to my network printer. On my laptop, I can... they are both running the same version of Debian. What could be missing?

Here are some details...

I have two computers running the same version of Debian. One is a server with no GUI and the other is my laptop with GDM installed. My laptop (which prints with no problem) is connected via Wifi. My server is connected directly to the router via Ethernet. I cannot print from the server.

The printer is a Canon Pixma MP495 that connects to the router via Wifi. I have downloaded drivers for the printer from [url] and installed them successfully using dpkg on both computers.

Right now I have a regular text file that I am using for a test page. To print from my laptop (with success) I type:

Code:

This does not work from the server. What could I be missing?

lpq run on server:

Code:

lpinfo readout:

Code:

View 14 Replies View Related

Programming :: Compare Two Files Line By Line And Print The Line Which Is Same?

May 30, 2011

I am trying to write a program in C which compares two files and prints the line that is equal.

Here file1.txt has

and file2.txt has

Note: file2.txt consist of only a single string where as file2.txt has multiple lines. Actually im comparing two files with md5sum values.

Here is the code but it compares only first line of files..but it should compare the whole file1..and sorry iam a beginner in C can any1 sujest some modification to this code so that..it can compare file2 with entire file1

Quote:

View 9 Replies View Related

Programming :: Pthread - Take String From The Command Line And Creates A Thread To Print The String

May 3, 2011

I've been trying to understand pthread in C a little better. So I made a simple program that takes in a string from the command line and creates a thread to print the string. I've looked online and copied the basic concepts but there are something things I'm confused about. The programs works just fine, but I have questions. Here's what I have so far.

[Code]....

One thing I'd like to know is why the 3rd argument in the pthread_create function which is my SendMessage function needs to be typecasted to a void pointer and then send the address of the function. Also as for the 4th argument, I would see typecasting to void pointer in some of the pthread examples I saw online, but in my case I'm passing a char pointer, would this be correct? In which case would I ever want to pass a void pointer?

Do I need a pthread_exit(NULL) in my main and in the SendMessage function? If so, why? I added the sleep() function so that I could let the pthread_exit function in my SendMessage function execute first. I simply saw that the online examples on pthread had pthread_exit() in both locations.

View 6 Replies View Related

General :: Parse A File And Print Each Line That Ends With Matching Pattern (if The Next Line Is Blank)

Aug 2, 2010

I've written a script to parse a file and print each line that ends with matching pattern, if the next line is blank. The pattern lines are the result of md5sum $i|sed 's/path///g' so that only md5 and filename appear. Here's what I'm using.

Quote:
for fline in `sed -n '/.*.ext$/p' file1`
do
if [ "`sed -n -e '/'"$fline"'/ {n; p;}' file1`" == "" ]
then
echo ""$fline" has no info" >>file2
fi
done
[Code]....

View 4 Replies View Related

Programming :: Scripting To Find Line And Print Previous Line To Out

May 21, 2010

I have a perl/python interpreter available on the system so really as long as the script would run on a standard linux build I'll be happy.So I don't know how to program a script that would find the unique key (which if needed, can be easily stripped out and put into a separate file) and then print out the data below it without going into the other lines.

View 4 Replies View Related

Fedora :: Run Python3 Scripts From Command Line And Call Up Python 2.6.2 Idle With The Command Idle From Command Line?

May 29, 2010

i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?

View 5 Replies View Related

General :: Sed - Print Line Number Along With The Line?

Jan 30, 2011

I want to print the line number with the pattern of the line on a same line using multi-patterns in sed. But i don't know how to do it. For example, I have a file

abc
def
ghi

I want to print

1 abc
2 def
3 ghi

View 6 Replies View Related

Ubuntu :: Lpr Command- And Man -t (bash Command - Print Both Sides Of The Paper Using A Printer?

Mar 29, 2010

I just recently learned about the wonderful little lpr command- and using man -t (bash command) to beautifully print man pages for reference- but is there a way to print both sides of the paper using a printer so equipped?

View 2 Replies View Related

Debian :: Print Command ( Print A File ) In Debian Through Comand Prompt ?

May 5, 2009

I have a debian system installed on my pc . I have just saved a text file on my desktop . Please let me know how can i print the file through comand prompt ? I need to learn the printing the file thru comamnd line .

View 1 Replies View Related

Software :: Use Command Line To Split A Single-lined XML Into A Multi-line XML?

Dec 9, 2010

I have a many text files that have XML tags all shoved into 1 line. I want to create a new file that splits each XML tag onto a new line. code...

View 3 Replies View Related

General :: Command Line Way To View A Line Of A File With Context?

Feb 24, 2011

I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:

$ (something) -l 154 stuff.py
150: def foo(bar):
151: """

[code]....

View 5 Replies View Related

General :: Printing Command Line History Without Line Numbers?

Aug 22, 2011

How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt

View 1 Replies View Related

Programming :: Gawk -- Print In A New Line Without Overwriting?

Sep 20, 2010

I have a directory where there are folders and in them some .txt data files. I am trying to output a .txt file with the folder name and the number of .txt files in it using gawk. However, when I run my shell program, because print is nested in a "while" loop, gawk overwrites what's already saved in the output file. I want gawk to print "new" output in a new line without overwriting the already existing text in the output fil

#! /bin/sh
# getting the folder list and the number of folders
ls | gawk '{print}' > ../folder_list.txt

[code]...

View 6 Replies View Related

Programming :: Print A Line Of Fill Character In C?

May 15, 2010

As you know, in C++ you can use setfill(char c); and setwidth( int length) to fill a line of a character.
It's line making a line of a character for output

Code:
NAME DEPARTMENT LOCATION
==========================================
Pete R&D Chicago
...
==========================================
As you see, a line of a '=' character drawn to output.

I'm wondering, how can I draw this line in C using printf() to format?
( no loop or repetiton )

View 8 Replies View Related

General :: Ubuntu 10.10 And Command Line Scripts - Error - Android: Command Not Found

Mar 26, 2011

I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...

I just installed the JDK, SDK, Eclipse successfully (or I assume):

* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).

** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,

My system:

Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2

View 5 Replies View Related

Ubuntu :: Is Command Line Invocation Of Gnome-terminal To Run More Than One Command

Feb 17, 2010

how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here:

Code:

#! /bin/bash
#
#TODO write this for gnome and xterm

[code]....

This same error occurs if the gnome-terminal line is changed to

Code:

gnome-terminal -e mcTerm

Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.

View 1 Replies View Related

Programming :: Effect Of Using Eval To Execute A Command As Opposed To Writing It On The Command-line?

Jun 18, 2010

Code: cmd='date | wc'

$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?

View 4 Replies View Related

General :: Access The Dbxml From The Command Line And It Returns Command Not Found?

Apr 30, 2011

I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found

path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found

Can someone point me in the right direction

View 1 Replies View Related

Software :: Command Line: Chown Command Recursively On Invisible Directories?

Oct 25, 2010

I tried

Code:

chown -R owner:group *

which does not work on the invisible directories (why?). When I used ".*" as wildcard it changed all (visible) files including the parent directory (the one I was currently working in which is the "dot") . I can change the invisible directories owner and group using dophin but how is it done from the command line?

View 9 Replies View Related

Programming :: Command Line Invocation Of Gnome-terminal To Run More Than One Command?

Feb 16, 2010

I am trying to learn how to pass more than a one-command startup for gnome-terminal.

I will give an example of what I'm trying to do here:

Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
${0##*/} [-x] [-g]
code....

However, running with the -g option to invoke gnome-terminal, I get a "There was an error creating the child process for this terminal" error.

This same error occurs if the gnome-terminal line is changed to

Code:
gnome-terminal -e mcTerm

Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.

View 4 Replies View Related

Programming :: Convert This Awk Command From Command Line Into An Awk Script ?

Oct 15, 2010

I'm trying to convert this awk command from command line into an awk script, but just cannot get it to work:

This is what i have after my BEGIN

Am i missing something here? this just prints out the count for everyline, not counting lines on 5th field that match 'A'

View 1 Replies View Related

General :: Write <Esc> In The Vim Command Line (:vim Command)?

Jun 24, 2011

how do you write the ASCII character #27 in the vim command line?

View 6 Replies View Related

Software :: Command Line Cd Command Not Working Right

May 4, 2010

Using netbook asus 1005ha with lucid beta 1 with most of updates on learning to use the CLI and headaches cd command does not seem to reconise directories here is a sample

Code:

yeh i know read the f#####g manual i am but any help would be greatly accepted tried sudo with same commands same problem did have a problem on my debian system that was to do with paths this is not the same on a different footnote anyone thinking of upgrading to lucid sit tight on 9.10 there are still to many issues that need ironing out for a system that is your main system.

View 6 Replies View Related







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