User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 402,659 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,254 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums

Script to list dir path and count characters?

Join Date: Oct 2005
Posts: 6
Reputation: pichels is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
pichels pichels is offline Offline
Newbie Poster

Re: Script to list dir path and count characters?

  #3  
May 1st, 2008
Hi Salem,

A great example but how do I list the directory's instead of printing "bad"?
Also, can I print out results with number of characters like:

/data/general/... : 230 chars

I appreciate your help!
TIA.

SP

Originally Posted by Salem View Post
find . - type f | awk -F/ '$NF > 10 && length($0) > 240 { print "Bad\n" }'
Reply With Quote  
All times are GMT -4. The time now is 3:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC