Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: xargs and xargs: unmatched single quote error  (Read 7124 times)

0 Members and 1 Guest are viewing this topic.

mbradfor42

  • Guest
xargs and xargs: unmatched single quote error
« on: January 30, 2006, 02:28:36 PM »
1. OS:
Linux 2.4.20-6

2. cd to /home/username

3. issue command:
find . -type f | xargs -n1 ls -al | awk ' NF==9 { print $3 } ' | sort -u

4.  Get the results back with this error:
xargs: unmatched single quote
username

Note: username = a valid user id.
This should return the other user ids in that directory.

Can anyone assist?
Is this becouse there is a funky file name within the directory/sub directories that xargs does not like?

Thank you,
Mike


mbradfor42

  • Guest
Re: xargs and xargs: unmatched single quote error
« Reply #1 on: January 30, 2006, 03:28:06 PM »
Found this to work:

find ./ -maxdepth 0 -type f | xargs ls -al | awk ' NF==9 { print $3 } ' | sort -u
it will produce the owner of the files and sort on the id.

I found this at: http://www.pixelbeat.org/cmdline.html
Under "File seaching" section.

Still though if anyone has a answer regarding the original error and how to prevent it.
I must have some subdirectoy that contains a file with charactors that xarg does not like.

Thanks,
Mike