The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with output of find command being input to basename command... new_learner UNIX for Dummies Questions & Answers 2 12-14-2008 02:56 AM
awk/sed Command : Parse parameter file / send the lines to the ksh export command rajan_san Shell Programming and Scripting 4 11-06-2008 01:29 PM
assign a command line argument and a unix command to awk variables sweta_doshi Shell Programming and Scripting 0 08-08-2008 06:54 AM
Help Required: Command to find IP address and command executed of a user loggedout Security 2 08-06-2008 08:12 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 08:26 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2009
salman4u salman4u is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 52
What does the following command do?

Hello,
what does this follow command imply?
Code:
ls -l | sed -n '/^.{5,8\}w/p'
Thanks in advance! i got confused seeing this command in one of the book's exercise
  #2 (permalink)  
Old 03-19-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,789
It displays only those files/directories that have the group/other write bit set.

sed -n means silent operation (don't print anything by default). The regex reads as "From the beginning of the line (^) match any character (.) 5 to 8 times ({5,8}). If somewhere between position 6 and 9 there is a literal 'w' print this line (set command 'p')"
  #3 (permalink)  
Old 03-19-2009
salman4u salman4u is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 52
thanks pludi
you're the man. You replied in a very straight forward manner that even a beginner like me could understand
thanks man again
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0