The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
file command rprajendran UNIX for Advanced & Expert Users 3 05-13-2008 10:45 AM
rm command not able to remove file jambesh Shell Programming and Scripting 7 12-21-2007 04:37 AM
What is the command to add heading to a file? whatisthis UNIX for Dummies Questions & Answers 3 12-02-2005 12:17 AM
End of file using more command Enda Martin UNIX for Dummies Questions & Answers 3 06-18-2001 07:49 AM
for file in ???? - command tamer UNIX for Dummies Questions & Answers 10 01-31-2001 06:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 09-01-2005
Registered User
 

Join Date: Jul 2005
Location: England
Posts: 183
Erk ... thanks for the correction :-)
Reply With Quote
Forum Sponsor
  #9  
Old 09-04-2005
Registered User
 

Join Date: Aug 2005
Posts: 6
Quote:
Originally Posted by vgersh99
Code:
sed -e 's/\(.*\)\([0-9]\{3\}\)/\1.\2/;ta' -e 's/\(.*\)\([0-9]\{2\}\)/\1.0\2/;ta' -e 's/\(.*\)\([0-9]\{1\}\)/\1.00\2/;ta' -e ':a' fileName
vgersh, is this command for use with the VI editor from the command prompt??
Reply With Quote
  #10  
Old 09-04-2005
Registered User
 

Join Date: Aug 2005
Posts: 6
Quote:
Originally Posted by Unbeliever
perl -e 'while($line=<>) { printf ("%.3f\n",($line/1000));}' inputfile.txt > outputfile.txt
Still not working .... I am using ActivePerl 5.8.7 Build 813 ... getting the same results as above.

any suggestions?
Reply With Quote
  #11  
Old 09-04-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
ActivePerl? What version of UNIX are you using? Use the command "uname -a" if you don't know what version you are using.
Reply With Quote
  #12  
Old 09-04-2005
Registered User
 

Join Date: Aug 2005
Posts: 6
Quote:
Originally Posted by Perderabo
ActivePerl? What version of UNIX are you using? Use the command "uname -a" if you don't know what version you are using.

I am running ActivePerl on Windoz XP Pro... not Unix.
Reply With Quote
  #13  
Old 09-05-2005
Registered User
 

Join Date: Jul 2005
Location: England
Posts: 183
Might be a 'quote' problem. Best thing to do is to put the code into a file. For example call it 'process.pl'

Code:
while($line=<>)
{
  printf ("%.3f\n",($line/1000));
}
And the from your XP command line do:

Code:
perl process.pl inputfile.txt > outputfile.txt
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0