Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All!!! Just installed my first Linux. Everything is fine, but ran into one problem. Linux is famous for being open source. I found a script in my destribution which ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    4

    Viewing source code of scripts

    Hi All!!!

    Just installed my first Linux. Everything is fine, but ran into one problem. Linux is famous for being open source. I found a script in my destribution which source code i cans see. When i use "less" command on it, here what it shows:

    ELFaux.so.25urrchroptargŒŒˆŒ €ŒxŒpŒhŒ`
    ŒXobexget. ..
    ŒPŒHŒ@Œ8Œ0Œ(Œ ŒŒŒŒŒŒ
    ŒŒŒŒŒŒŒ ŒŒŒ*:’ m P0Ÿ,„:*Ÿ EŸ
    *( *
    Ÿ **j *ͷO
    *LŸ 6 :f:0 $‚04ƒŒ* *70C00Ÿ.0c]AX0IMGaB *
    :. ..
    00*  l Ѝ0k
    *0*0*Q
    *ž *D0Ÿ š@0Ÿ0š@cDA*@D$0ŸPš*•@D%s [parameters] bdad
    dr channel localfile(sUse "-" to not send mime header.Œ 3.4.5(END)

    This script was included in my distribution by a 3rd party. I was wondering if it was possible for them to code it the way, so i cant see it. (just like windows programs do) or maybe i am using a wrong command to view it? I can see code in config files and so on, but in theirs scripts.

    I need to see how that script works, that would save me a lot of money and time. Also, what programming language is used in Linux to write applications?

    Any help would be much appreciated.

    Thanks in advance.

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Ft. Polk, LA
    Posts
    796
    Likely it's not a script, but a binary file which you won't be able to view like that. Your best bet is to google whatever program it is and download the source tarball for it. Especially since many things are actually multiple files compiled into one or a few executables. Just like Windows programs you refer to, they are written in human readable form, then compiled into human nonreadable form like what you are seeing.

    Another possibility is that less got confused about something and isn't viewing it right. Perhaps try more or cat instead. Less isn't always more, and sometimes they both can't catch the cat.

  3. #3
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Quote Originally Posted by valan
    Less isn't always more, and sometimes they both can't catch the cat.
    But we can make the most out of it :-p

    Looks like binary to me, that file. You can make sure by typing <file name_of_file>. That will tell you what it is. Binary is not intended for human eyes. You can however obtain the source code as valan points out. It comes as .tar, .tar.gz or .tar.bz2
    Quote Originally Posted by ruslan35
    Also, what programming language is used in Linux to write applications?
    Any number... C, C++ of course, and, ehm... others... Java
    Can't tell an OS by it's GUI

Posting Permissions

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