Re: awk help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thursday, December 02, 2010 07:57 AM, Les Mikesell wrote:
> On 12/1/2010 5:44 PM, Ross Walker wrote:
>> On Dec 1, 2010, at 5:07 PM, Christopher Chan<christopher.chan@xxxxxxxxxxxxxxx>   wrote:
>>
>>> On Thursday, December 02, 2010 05:09 AM, ann kok wrote:
>>>> Hi all
>>>>
>>>> Anyone can help to let me know how to
>>>>
>>>> ls -1 | lsattr
>>>
>>> lsattr `ls -1`
>>>
>>>>
>>>>
>>>> ls -al /folder | awk '{ print $2}' | lsattr
>>>>
>>>
>>>
>>> for i in `ls -al /folder | awk '{ print $8}'`; do lsattr /folder/$i; done
>>
>> You can probably do that last one as a pipe to xargs instead of a shell loop.
>
> I'm missing something here.  Why does lsattr need help from ls?
>

It does not. I don't know why the OP is even trying to do it this way. 
Just thought I'd demonstrate some bash stuff. :-p
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux