Skip to content
Advertisement

Tag: command-line

Print contents of a PDF to the command line

I’m looking for a command-line program that will print out the text of a PDF file, just like cat for a text file. I’ve found pdftotxt, and that would be workable, but I’d prefer something that replicates the cat functionality because I want to pipe to grep. Thanks! Answer On the man pages for pdftotext, I found this: pdftotext [options]

Running PHP script from command line as background process

I’m trying to run a PHP script continually in the background via the command line in Linux. I have tried the command php filename.php & but it seems like the script execution terminates very quickly, while it should keep running until the process is terminated. Any suggestions? Answer Are you sure the script doesn’t contain any errors? This is what

Combining two files in different folders in Linux

I have two set of folders that have files with the same filenames and structure. The folder structure is something like this: So what I need to do is to combine (append) all the files with the same name in these folders (file1.txt with file1.txt etc.) into another file inside the outputfolder. After getting these combined files I also need

extracting unique values between 2 sets/files

Working in linux/shell env, how can I accomplish the following: text file 1 contains: text file 2 contains: I need to extract the entries in file 2 which are not in file 1. So ‘6’ and ‘7’ in this example. How do I do this from the command line? many thanks! Answer Explanation of how the code works: If we’re

Rename JPG files according to date created

I want to rename all files in a certain directory. Renaming them to their date of creation. So if my file is Image1.jpg, it should rename into something like “Jan 16 12:09:42 2011.jpg” I want to do this through command line. I’ve been trying: But how can I combine this with mv command? And how will I iterate stat and

MySQL the command line and pagers

I cant find anything about this from searching here. I use mysql on the command line at work and I work with fairly large tables so I set the mysql pager allowing a more readable result if I run a query, that returns 1000’s of results. I use the command below to set the pager. This suits my needs but

getting a program to return immediately at the command line so it’s not tied to the shell that launched it

Some programs return immediately when launched from the command line, Firefox for example. Most utilities (and all the programs I’ve written) are tied to the shell that created them. If you control-c the command line, the program’s dead. What do you have to add to a program or a shell script to get the return-immediately behavior? I guess I’m asking

A command to download a file other than Wget [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Advertisement