Software :: Output Format In Perl Script?
Jan 26, 2011
I have a perl script that prints an output to standard output using a for loop .It prints a new line every time ,I would like subsequent outputs to be displayed on the same line , I don't want a new line in standard output .Could anyone help plz
$count = $hrstorun*60/$intmin;
$interval = $intmin*60;
for ($c=0; $c < $count; $c++ )
[code]....
View 6 Replies
ADVERTISEMENT
Jan 22, 2011
I'm still trying to find out if my coby mp3 player will actually play mtv video files as is advertised.
ffmpeg -formats does list mtv but the only command I really ever used was one to convert a vid to an mp3 so I tried Code: ffmpeg -i test.mp4 -acodec copy output.mtv it returns Code: Unable to find a suitable output format for 'output.mtv' I can't find any mtv files online for purchase or free for that matter, so I know this is all pretty obscure but shouldn't there be a way to convert them since ffmpeg lists mtv format?
View 6 Replies
View Related
Feb 8, 2011
I am trying to use awk command in perl. Below is my awk comamnd which works alone.
awk '{Easttot=Easttot+$1} END {print Easttot}' MessagesProcessedEAST2Cnts.dat
I would like to use this awk's output in shell script. I am using system command like below to get the out put. But it is not working.
$Output = system("awk '{Easttot=Easttot+$1} END {print Easttot}' MessagesProcessedEAST2Cnts.dat'");
View 3 Replies
View Related
Sep 27, 2010
I'm writing a script that gives me some pertinent info about my servers, and the last little piece I need to figure out is the process list. There are going to be non-technical people looking at the output of the script and I'm trying to make it as simple as possible.
Right now, if I do ps -ef | grep <process> | grep -v grep
It obviously shows me the process, but the problem is that there is 4 lines of info in front of the process. ie
root PID date time java -1024 -cp oh,my,god,there,is,so,much,data,it,carries,on,for,4,lines,I,want,to,shoot,myself,trying,to,read,it,f inally,in,the,end,there,is,a,space /here/is/the/process
I'd like the output to be something like this:
PID: #### Process: /here/is/the/process
I've thought about how I could take the output and use awk or sed but I know there is probably an easier way to do it with perl.
View 12 Replies
View Related
Feb 22, 2010
Here is some line I have written in perl to show my name :
[code]...
And after stdin kumar, its giving the output as
[code]...
output should be [code]... but why its coming in two lines?
View 2 Replies
View Related
Nov 25, 2010
I am trying to execute a Unix Command in perl and assigning its output to an array:
Code:
@File_List=exec("ls -1 /tmp");
but it is not working. I have tried the perl function system() also but its return code is
[code]...
View 10 Replies
View Related
Feb 18, 2010
The perl script I wrote works fine if I print the result to screen
x0_amber.pl 1 1000 0 5
But whenever I want to output to a file with
x0_amber.pl 1 1000 0 5 > x0_out
it never really prints out to the file.
It worked earlier, but I was playing with my PATH lately, I don't know if it's related to that
View 7 Replies
View Related
Mar 2, 2010
I'm flooded with online information and am looking for some concise advice For all of you who are familiar with Avidemux: The program offers an abundance of video output formats (MPEG-2, MPEG-4.AVC, MPEG-4.ASP (lavc), MPEG-4 (xvid), H.263). Which format would you recommend for storing home videos, with regard to (a) being able to view them easily on different PC platforms, and to (b) being able to view them still in n > 5 years from now?
View 9 Replies
View Related
Feb 25, 2011
I'm trying to format the output of ls -l code...
View 2 Replies
View Related
Aug 27, 2010
i am running ps xo "pid,command" but I can't find my process in the results. I know that the process is running because I run ps ax | grep command-name
View 4 Replies
View Related
Feb 5, 2010
I have a script that is in Unix. I wanted to know is there any difference between output of ls command in unix and linux
In Unix
Code:
ls -ltr | awk '{print $9}'
In linux output is something similar to
Code:
drwxrwxrwx 2 vinay vinay 4096 2010-02-04 20:31 test
According to above output nothing will be displayed for
Code:
ls -ltr | awk '{print $9}'
ls -ltr | awk '{print $8}' will give test as ouptut in Linux.
I wanted to check the output format for ls -ltr, Anyone using Unix systems may paste a sample output of the command ls -ltr..
View 2 Replies
View Related
Mar 6, 2010
stat is (generously) giving twice the expected output:
Code:
c@CW8:/tmp$ touch foo
[code]...
View 2 Replies
View Related
Mar 4, 2010
it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format
here is my script
Code:
#!/bin/bash
g=`tail -1 new.txt|head -n 1`
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for((i=1 ; i <$g+1 ; i++))
[code]....
the message is supposed to be hello , i need to get rid of the endlines somehow..
View 2 Replies
View Related
Dec 8, 2010
How can format the date command to output the following format 08-Dec-2010.
View 3 Replies
View Related
Oct 4, 2010
Its my first post in here so please be patient I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.
As an example : I have text file with orders and returns :
Item2-SKU-2-11.08.2010-online
Item3-SKU-3-11.09.2010-return
Item4-SKU-4-11.09.2010-store
My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)
View 1 Replies
View Related
Jul 16, 2011
openSUSE 11.3 32bit with repos OSS, NON-OSS and Packman + libdvdcss I installed DVDStyler from Packman and as it seems I can't get it to work. When I create a project for PAL, 4:3 with AC3 and finally click "Burn" and select "just generate" to create files for burning I get:
Code:
DVDStyler v1.8.3
Linux 2.6.34.8-0.2-desktop i686
FFmpeg: libavformat 53.4.0, libavcodec 53.7.0, libavutil 51.9.1
Prepare
Cleaning temporary directory
[Code]...
View 9 Replies
View Related
Feb 21, 2011
How to convert Tcpdump output file to a Pcap format? Is there such way?
This is what i mean:
tcpdump -i eth0 >> test.out
Now i want to convert test.out to Pcap so It's readable via Wireshark.
View 5 Replies
View Related
Aug 11, 2010
I am new here and want to lern CentOS. Current I have installed CentOS 5.5 x64 and Perl 5.8.8. Now i have install Perl 5.12.1 which located to /usr/local/bin/perl. But how I can move it to /usr/bin/perl so root based on Perl 5.12.1?
View 7 Replies
View Related
Jul 7, 2010
I am trying to launch the perl config, but when I do so I can an weird error.It seems to be that it does not regonize perl ?
conf.pl: line 11: =: command not found
conf.pl: line 19: my: command not found
conf.pl: line 20: syntax error near unexpected token `{'
[code]...
View 2 Replies
View Related
Aug 14, 2010
I recently reinstalled the B module for perl. Now I found out it didn't just do that, it installed a whole new copy of perl into /usr/local/bin/perl. When I type 'which perl' at the terminal, it says '/usr/local/bin/perl' instead of '/usr/bin/perl'. Normally, this wouldn't bother me. But I installed the one in local/bin without threading support. The one that comes with the system already is build with threading support, which is why I want to switch back to the system perl, and possibly remove the one in /usr/local/bin.
So how do I change it so that the result of 'which perl' returns as '/usr/bin/perl'? And what do I have to do to remove /usr/local/bin/perl?
The reason I need threading support is because I'm designing a file copier that copies several chunks of a file simultaneously to speed up the copying process. Guaranteed a useful script if it works.
View 7 Replies
View Related
Jun 28, 2010
I'm new in perl programming and linux OS. What is the difference between perl and perl-devel? What does mean devel? Iwant to install Catalyst and before install as required I have to check if make, gcc and perl-devel are installed in my system. make and gcc are installed. But I have to install perl-devel. First I searched for make, gcc and perl-devel in YAST Software Management and search did not find perl-devel. I visited the software.opensuse.org and wrote "perl-devel" and searched. The result was many similar zips with a prefix perl-devel and I can not choose one for needed perl-devel.
[Code]...
View 5 Replies
View Related
Apr 8, 2009
I am trying to setup the wlan access for my Fedora 9 system. I installed ndiswrapper. But when I run
Code:
ndiswrapper -l
i am getting the error
Code:
/usr/bin/perl: symbol lookup error: /usr/bin/perl: undefined symbol: PL_use_safe_putenv
View 11 Replies
View Related
Jun 2, 2011
I am unable to run perl-cgi script in my cent os Apache server. I have used locate perl command in terminal window and it gives following result:
[code]....
tell which is the path to perl for example "usr/bin perl"
View 13 Replies
View Related
Oct 9, 2009
just wondering is there a simple script to convert datetime to UTC format. I have been searching different forums but most answers are for converting UTC to datetime. For example what is a simple command/script to convert todays datetime to UTC format i.e. '2009-10-09 11:47:59'.
View 10 Replies
View Related
Apr 7, 2010
my school we want to print a magazine but we have problem with the format of the files. We need to create a sheet in A3 format from two sheets in A4 format. I was reading about the pdftk library but it doesn't do what i need.
View 4 Replies
View Related
Jul 21, 2011
converting videos to 3gp format.
i have installed transmaggedon software but it fails to convert because quicktime muxer plugin is not installed.
This plugin is not available in the repositories.
How can i get this video converter to work or what else can i do to be able to convert videos to 3gp format?
View 2 Replies
View Related
Sep 15, 2010
I need some assistance in trying to format a USB hard drive to vfat format but can't seem to do so. I am currently using RHEL 5.3. I have tried the following commands and they all come back as "command not found"
mke2fs vfat /dev/sc1
fdisk vfat /dev/sdc1
mkfs.vfat /dev/sdc1
What am I doing incorrectly?? Can someone please point me in the right direction??
View 6 Replies
View Related
Jun 21, 2010
the time format i have used is %m:%d:%Y:%H:%M:%S eg- 06:21:10:13:29:18 and i want to convert it to 2010-06-21 13:29:18..
View 4 Replies
View Related
Dec 17, 2010
I have a small problem with Perl and Apache.
If I use "#!/usr/bin/perl" in the beginning of a perl script the script won't work if the script is at all complicated. Simple scripts like "Hello World" works.
But if I use "#!/usr/bin/perl -w" in the beginning all scripts work?
If I don't use the -w this is whats in the logs:
(2)No such file or directory: exec of '/home/test.net/html/cgi-bin/uh/meny.pl' failed
Premature end of script headers: meny.pl
When I use the -w in the script the error-log shows me this.
meny.pl: Name "main::http_path_cgi" used only once: possible typo at /home/test.net/html/cgi-bin/uh/meny.pl line 24.
View 1 Replies
View Related
Apr 29, 2010
I cant seem to get the sound working and when I click on perference then sounds and go to the output selection it has only dummy output as a option.
View 3 Replies
View Related