AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  AIX sudo and ^M characters

    Posted Tue April 10, 2012 09:53 AM

    Originally posted by: SystemAdmin


    Hello there,

    I am writing to get an insight into a odd problem I am seeing with a AIX box while using sudo over ssh. It appears the server is inserting a ^M character at the end of each line while reading a file over while using sudo, but it doesn't do that while logged in as root. Similarly it inserts a ^M character at the end of each cmd result while using sudo, but not root. This is happening against only one of our servers, and I can't tell why its doing what its doing. Does anyone have a insight into this?

    Adam
    #AIX-Forum


  • 2.  Re: AIX sudo and ^M characters

    Posted Tue April 10, 2012 10:07 AM

    Originally posted by: alethad


    It's how the user reads hidden control characters. this usually occurs when ftp'ing or transferring a text file.

    Just go into the file with vi and run this command
    You've got to continue to grow, or you're just like last night's cornbread -- stale & dry Loretta Lynn alethad
    #AIX-Forum


  • 3.  Re: AIX sudo and ^M characters

    Posted Tue April 10, 2012 10:09 AM

    Originally posted by: alethad


    It's how the user reads hidden control characters. this usually occurs when ftp'ing or transferring a text file the the control chracters get inserted.

    Just go into the file with vi and run this command :1,$ s'^M' 'g
    To get the ^M you have to do ctrl v M to get it on the vi commandline. there is a space between the second quotes
    You've got to continue to grow, or you're just like last night's cornbread -- stale & dry Loretta Lynn alethad
    #AIX-Forum