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
problem cutting finalight Shell Programming and Scripting 6 05-20-2008 05:53 PM
Question about SED cutting and renaming spindoctor Shell Programming and Scripting 10 06-20-2007 11:04 AM
cutting terms5 UNIX for Dummies Questions & Answers 1 03-14-2006 10:33 PM
cutting out the last field bcheaib Shell Programming and Scripting 2 06-07-2005 01:06 AM
Cutting Up a String lesstjm Shell Programming and Scripting 4 09-21-2004 08:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-08-2008
Registered User
 

Join Date: Sep 2008
Posts: 4
Cutting In Unix Question

Please Delete!

Thanks.

Last edited by Shiruken; 09-08-2008 at 07:58 PM.
Reply With Quote
Forum Sponsor
  #2  
Old 09-08-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Code:
awk -F"[ .]" '{ printf "%s ", $1; if($0 ~ "log") { print $(NF - 1) } else { print $NF } }' filename
Reply With Quote
  #3  
Old 09-08-2008
Registered User
 

Join Date: Sep 2008
Posts: 4
Awesome! But I have to do it with the "Cut" feature.

Is there any way to do that?

(I know it's lame!)
Reply With Quote
  #4  
Old 09-08-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
yes, you can do it.

But why not awk ? What stops you from using awk ?
Reply With Quote
  #5  
Old 09-08-2008
Registered User
 

Join Date: Sep 2008
Posts: 4
It is for a project we are working on in our programming class. We can't use awk. I wish I could. That's why I can't figure out how to do it. I got so use to using that!
Reply With Quote
  #6  
Old 09-08-2008
Ikon's Avatar
Registered User
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 407
You CANT post homework/schoolwork projects here, please read the rules.
Reply With Quote
  #7  
Old 09-08-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Please read the rules of the forum.

Homework questions are not allowed here.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:09 PM.


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