Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

count word

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 10-12-2005
ariuscy ariuscy is offline
Registered User
Join Date: Sep 2005
Last Activity: 13 October 2005, 9:06 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
count word


given a file
i need to get the first line and secodn line
and count each of the line whether the length of first line and second line is the same

i don;t know how to get the length of the line...seems like use 'wc' cannot do it...
please advice
Sponsored Links
Old Unix and Linux 10-13-2005
blowtorch's Unix or Linux Image
blowtorch blowtorch is offline Forum Advisor  
Join Date: Dec 2004
Last Activity: 1 July 2016, 6:18 AM EDT
Location: UK
Posts: 2,351
Thanks: 0
Thanked 6 Times in 6 Posts
Sounds like homework to me! Still, I will give a hint. You can use awk to get this very easily. Why don't you go through the man pages or some books on awk?
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
if, word count azertyazerty Shell Programming and Scripting 3 12-20-2010 09:18 AM
Word count aadi_uni UNIX for Advanced & Expert Users 4 12-03-2009 10:07 AM
Word count of lines ending with certain word warlock129 Shell Programming and Scripting 8 08-30-2009 03:37 AM
Word Count s_chowhan UNIX for Dummies Questions & Answers 10 04-30-2009 03:16 PM
specified word count bhaviknp Shell Programming and Scripting 5 02-27-2008 10:23 AM

All times are GMT -4. The time now is 01:37 PM.