Ubuntu :: Run Perl File From Command Line?

Jul 24, 2010

I'm trying to run a perl script found at http://wiki.scribus.net/index.php/Web_optimised_PDF.

running "compress-newsletter.pl input.pdf" produces the result:

-bash: compress-newsletter.pl: command not found

View 4 Replies


ADVERTISEMENT

Programming :: Perl - Delete Line From Text File With Duplicate Match At Beginning Of Line

Apr 1, 2009

Was wondering if any perl guru's could help me with a quick log file adjustment. I have a text file that looks like so (tabs and newlines are revealed so you can see what separates the data):

There are maybe 100 lines of text in this file at any given time. I need to delete all duplicate lines only looking at the first bit of text prior to the first tab. It doesn't matter which one gets deleted as long as there are no two lines that begin with that same text at the beginning before the first tab. So in this example, either the fist line "1234" or the last line "1234" would need to be deleted. I already have code in my script that opens the files - I just need the code to read the text into an array and the part that would find matches based on the above criteria, and make the deletions.

If it would be easier, I can even do a system call and use SED (v4.1.5) and/or AWK (3.1.5) instead.

View 7 Replies View Related

General :: Perl Command To Replace String By Line Numbe?

Jul 10, 2010

I want to know the Perl command to replace a string by pointing the line number. I know how to replace a string without pointing a line number but I am in need to replace only the two matching string in a file

View 6 Replies View Related

Programming :: Perl - Way To Encrypt Command-line Input When User Enter A Password ?

Nov 4, 2010

I need user to input a password through command line in Windows cmd prompt. Is there a way to encrypt the input (such as put it into ......) when user is typing ?

View 2 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

Programming :: Perl Script To Replace Line After Finding Previous Line

Feb 28, 2011

At the moment I have a flat file which is being used by a few people. I want a script to remotely change the file, so I can start logging who is doing what.At this point here is one requirement I am trying to develop. We have text blocks who pretty much look like.I hope this is somewhat clear. I try to find $param for the right $workflow and change that. Can you help me to find $$var3 and change that?

View 1 Replies View Related

Programming :: Find And Replace A String In A File Using Perl Command From Bash Script?

Feb 14, 2011

I wanted to find and replace a string from a perl file. I have written a script in bash which runs the following command.

perl -pi -e "s/$findstring/$replacestring/" testfile
where as $findstring = print F_WC_TMP"$line
";
and $replaceString = $line = join ' ', split ' ', $line; print F_WC_TMP"$line
";

But when I am running the above command, i think it is replacing the $findstring with the above mentioned string and hence it contains a $line, it is looking for the variable $line and not finding the exact string. I am confused about how to search for a string that contains $ in it and replace it with another $string.

View 5 Replies View Related

Ubuntu :: Convert A .ods File To A .csv File Via Command Line?

Oct 28, 2010

I would like to convert a .ods file to a .csv file via command line on a server running ubuntu with no graphical interface.

xls2csv does a perfect job on xls files; is there something similar for ods files?

View 1 Replies View Related

Programming :: Perl Script To Read Line By Line

Aug 2, 2011

I just learn perl script.May i know how to simplify the code below especially in the red color part? i saw some examples in internet, they use "next" command.

View 20 Replies View Related

OpenSUSE :: .jar File Runs Fine In Command Line But Not From File System?

May 3, 2010

My .jar file needs and uses some files in the same directory it's in (everything, including the jar was unzipped into said directory). It runs perfectly when I do java -jar file.jar in the command line, but there's trouble when I double-click the file when running from the file system manager. I've tried a custom command under properties ie java -jar, but the problem is that the .jar file doesn't seem to be able to use any of the files in the same directory. When running, the jar can't find any of the files that it needs.

View 5 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

Ubuntu :: Open A File With Command Line?

May 29, 2010

is it possible to open a file with a terminal without specifying the application it will use ? In fact I mean what is the equivalent of the double click on the file manager for a terminal.

View 9 Replies View Related

Ubuntu :: Search In A Log File Via Command Line ?

Jun 3, 2011

I have some large log files that I would like to search for a specific text via command line in the file. I know I can open the file in GUI but is there command that I can run against the file path then make it search in the file in command line?

View 7 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 :: Ubuntu - Replace A File In Jar With Command Line ?

Oct 18, 2010

I have a jar, and I need to replace a class in it, at this moment, I can only open it with "archive manager" and then drag and drop the new compiled class into the jar, but I think this is really boring, if I can do with with just a command ?

View 1 Replies View Related

Ubuntu :: Using File Manipulation Tools On The Command Line?

Apr 23, 2010

i need a good lesson in using file manipulation tools on the command line

View 2 Replies View Related

Ubuntu :: Unpack A *.deb File On Server Command Line?

May 13, 2010

how to unpack a .deb file on server, I tried tar, but doesn't work

View 4 Replies View Related

Ubuntu Servers :: How To Unpack A *.deb File On Command Line

May 13, 2010

I put command sudo dpkg - unpack file.deb

server say need an action option

View 1 Replies View Related

Ubuntu Servers :: Executing PHP File Via Command Line

Nov 16, 2010

I have a php file that I need to execute via a cronjob. This file should be run by the www-data user as its a file in my /var/www/project folder. When I run this file under root (php -f cron.php) everything works perfectly, but I want it to run under the www-data to be safe. Before I run it vai crontab I tried it via command line as the www-data user and I receive errors:

Fatal Error: Allowed memory size of 8388608 bytes expired (tried to allocate 232 bytes).

But when I run it as the root user I get no errors and everything works correctly. The file cron.php is used to process automated tasks in my CRM. So I don't really want to have the root user running a crontab every few minutes for this.

Must the www-data user be given more permissions? I am using Ubuntu 6.06LTS
PHP - 5.1.2
Apache - 2.0.55
MySQL - 5.0.22

View 4 Replies View Related

Ubuntu :: Copying Files From One File Without Using Command Line?

Dec 9, 2010

Is there a way to copy a file from the desktop to /usr/lib/ICAclient folder that I have, by using drag and drop.For some reason, I thought I was able to do this in Mint.

View 9 Replies View Related

Ubuntu :: Java File Doesn't Run Over The Command Line?

Jul 13, 2011

I have bound over the command line all for my work related jar files to my CLASSPATH
and can now execute the command javac HelloRDFWorld.java and there comes noerror messages. I assume javac command can be executed without any problems:

/workspace/JenaTutorial/src/main/java/tutorial$ javac HelloRDFWorld.java
/workspace/JenaTutorial/src/main/java/tutorial$

But there are still one problem; although my java file can run in Eclipse environment without any problems it does not run over the command line:

//workspace/JenaTutorial/src/main/java/tutorial$ java HelloRDFWorld.java
Exception in thread "main" java.lang.NoClassDefFoundError: HelloRDFWorld/java
Caused by: java.lang.ClassNotFoundException: HelloRDFWorld.java

[code]...

View 3 Replies View Related

Ubuntu :: Change File Property Using Command Line?

Jan 16, 2011

i want to know how to change file property using linux command line?

View 3 Replies View Related

Fedora :: Put A Command In Front Of Every Line In File?

Jan 15, 2011

I have a list of domains in "domains.txt" , and I wanted to put an "nslookup" in front of each line and run it.. However I could not figure out a command for it.. Any ideas how to do this simple task?

View 7 Replies View Related

General :: Download A File From Command Line?

Apr 8, 2011

Let's say i have a link to a file http://www.domain.com/dir/myfile.ext

Is there a command line tool that will allow me to download this file. I'm looking for something like: download <http address> ... is there anything that simple?

View 2 Replies View Related

General :: Insert Line Into A File With A Command?

Jan 4, 2010

I would like to insert a line into the /etc/sysconfig/iptables with a command like sed or with any script. How can I insert this line:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

but under the line "-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT"

View 2 Replies View Related

Server :: Use Scp Or Sftp Command Line With A Key File?

Oct 6, 2010

Running: Red Hat Enterprise Linux Server 5.2 (Tikanga) I need to be able to automate transferring a few files over from one server to another using scp or the sftp protocol. I have received a text file which looks like a key file along with username and passphrase information for the target server in question.

Instructions were given to me to import the provided text file in puttyGen then save the imported key as a private key to be used by scp or sftp. My assumption is this is for windows utilities, which I am not using. My frustration comes in trying to automate logging into this server via sftp or scp to automate some file transfers. I am asked for a password every time because the public and private key methods failed to find my keys. How can I call scp or the sftp utilities and use the provided key file (the one I generated using puttyGen or the original one provided to me) to login to this server? I've tried taking the generated ppk file from puttygen and adding it with the ssh-add command but that still did not work.

View 4 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

General :: Download A File Using Command Line?

May 18, 2009

I want to download a file from the Linux command line. Basically I'm using ssh and I'm trying to download a file to my file system on my laptop. How can I do that from the command line?

View 3 Replies View Related

Ubuntu Multimedia :: Get Music File Info In Command Line

Jan 13, 2010

How to get info (length, etc.) about music files in command line? Nautilus can show it on the file's Properties > Audio tab.

View 2 Replies View Related

Ubuntu :: Open The File Manager By Command Line Using Sudo?

Apr 6, 2010

I would like to open the file manager by command line using sudo, but I just can't remember the name of it!! I can "almost" remember it... but it escapes me. And I am afraid I don't know where to look for it.

View 9 Replies View Related







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