Find the answer to your Linux question:
Results 1 to 3 of 3
Hi I have been using awk for some time now and i am facing an issue... The below works only on fedora 7 and above but this gives the syntax ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2

    Question query on awk behaviour

    Hi

    I have been using awk for some time now and i am facing an issue...

    The below works only on fedora 7 and above but this gives the syntax error when run centos, RHEL and even on Fedora 6.

    ls -l | awk {'print "dir",$1,$2,0,0'}

    Can you please help to analyze the behavior and explain why this works on fedora 7 and above and why not on other OS.

    Regards
    Janardhan B

  2. #2
    Linux User
    Join Date
    Nov 2009
    Location
    France
    Posts
    292
    Just to clarify things, what do you expect as output ?

    On Mandriva 2010.0, the output is as expected :

    dir -rwx------ 1 0 0
    ...


    I won't really be able to find out 'why this works on fedora 7 and above and why not on other OS.'

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Hi

    Thanks for your reply...

    The output what you got is the expected one.

    Please let me know if you get to know the reason.

    Regards
    Janab

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...