Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Looking for an individual who is confident in shell scripting
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Looking for an individual who is confident in shell scripting

I'm looking for someone who is confident in scripting in shell.

I'm only looking for one or two files to be made for a web service I am creating and will explain the details over PM if you are interested.

Payment is available, but I will discuss this with you when you can estimate how long this will take (as I'm not sure, sorry!).

Future paid imrovements may be an option with this also.

Thanks a lot for taking a look! :)

Comments

  • @iKeyZ said:
    I'm looking for someone who is confident in scripting in shell.

    We have a few bash and python scripters inhouse, feel free to message us.

  • iKeyZiKeyZ Veteran

    @GoodHosting said:
    We have a few bash and python scripters inhouse, feel free to message us.

    Do you have a direct email I can catch you on, instead of the form on your site?

    Thanks

  • @iKeyZ said:

    Sent you a PM.

  • mikhomikho Member, Host Rep

    Interested to know what you need to be done, might be able to help you out depending on the work.

  • iKeyZiKeyZ Veteran

    @MikHo said:
    Interested to know what you need to be done, might be able to help you out depending on the work.

    I'll PM you the details. :)

  • KuJoeKuJoe Member, Host Rep

    I'm always up for some shell scripting. Feel free to PM me if you still need somebody.

  • As am I, PM the details and I 'll see if maybe I have something already as I have a ton of scripts, if not I'll quote you on your specs.

  • I can do it as well, let me know via PM if you haven't found someone already.

  • iKeyZiKeyZ Veteran

    PM'ed you all details. :)

  • KuJoeKuJoe Member, Host Rep

    If any of you figure out a solution for what he's asking please PM me. I have quite a few shells scripts I would love to re-write to do what he's asking but Google doesn't have a single result on if it's possible or not.

  • @KuJoe said:

    We're currently writing up something for him.

  • iKeyZiKeyZ Veteran

    @KuJoe said:
    If any of you figure out a solution for what he's asking please PM me. I have quite a few shells scripts I would love to re-write to do what he's asking but Google doesn't have a single result on if it's possible or not.

    If you got my latest response, that would be acceptable as well. :)

  • AlexBarakovAlexBarakov Patron Provider, Veteran

    Am I the only one that thinks this is an extremely easy task?
    @KuJoe which part of it you can't write?

    Alexander

  • KuJoeKuJoe Member, Host Rep
    edited August 2014

    AlexBarakov said: @KuJoe which part of it you can't write?

    How do you _POST to PHP without being able to use PHP? I have a dozen scripts that use curl for _GET to PHP, but to my knowledge you can only _POST from PHP to PHP but one of the requirements is that you cannot use PHP (strictly shell scripting).

    Now that he removed the _POST requirement, the request is 100x easier and something I already have scripts for using _GET. :)

  • @KuJoe said:

    ... That's not hard at all, what the hell? You'd do it any other way you'd ever simulate a POST request. There are a number of utilities that come with a standard Linux system that would allow you to do such a thing, the most common being:

    curl

    Else, you can use the actual utility:

    post

    Or you can use any other language that is already available on a Linux system:

    python

    perl (not always available)

    ruby (not always available)

    wget (yes, it CAN post.)

  • GoodHosting said: We're currently writing up something for him.

    Weird, I was also asked to write the code and gave him a working product. Waiting for him him to see if it's working correctly on his end.

  • @black said:
    Weird, I was also asked to write the code and gave him a working product. Waiting for him him to see if it's working correctly on his end.

    Ahh, I guess you beat us to it :).

  • KuJoeKuJoe Member, Host Rep

    @GoodHosting, my Google-fu failed me then. I admit I only spent about 30 minutes searching for a solution but was unsuccessful. Can you send me some examples or link me to some guide/tutorial? I would love to convert my scripts over to POST versus GET. :)

    It goes to show you that you don't need to know how to write code to be a developer. ;)

  • GoodHostingGoodHosting Member
    edited August 2014

    @KuJoe said:
    It goes to show you that you don't need to know how to write code to be a developer. ;)

    You actually have a very good point there, it has turned into something where almost anyone can be a "Developer" or "Systems Administrator" just with some good Google-fu. This is how I got along before I actually went and learned something :), so I'm well aware it works for a good few years before anyone notices.

    Here are some examples, although; none of these examples do the JSON encoding that he wanted (as that's not very easy to do without an external dependency.)

    #!/bin/bash
    
    # Fill environment with memory-related metrics in POST format.
    # NOTE: The tr/sed could probably be more efficient as well, but meh.
    POSTINFO=$(tr '\n' '&' </proc/meminfo | sed -e 's/:/=/g')
    
    # Feed those metrics into curl to be sent off
    curl --data "${POSTINFO}" http://example.com/page.php
    

    Edit: Optimized the fetch a little.

  • nice and simple. you could do some more text mangling to get JSON format if it really matters.

  • iKeyZiKeyZ Veteran

    @black said:
    Weird, I was also asked to write the code and gave him a working product. Waiting for him him to see if it's working correctly on his end.

    I have only asked you to write it so far. I have only given details to others.

    @mpkossen This thread can be closed. :)

  • @ricardo said:
    nice and simple. you could do some more text mangling to get JSON format if it really matters.

    Yup. Although, JSON has special rules about quoting variables, so it wouldn't be the prettiest to try and emulate JSON with basic awk/sed/tr . I'd much rather prefer including the external dependency of python's JSONp module... or the jsonlib package at least.

  • Since the output is predictable you just need to add some curly brackets, quotes and colons, no escaping required.

  • @ricardo said:
    Since the output is predictable you just need to add some curly brackets, quotes and colons, no escaping required.

    The output isn't that predictable, my output for example; includes a lot of specific kernel modules. Hell, I've seen some modules (proprietary, like HGST's stuff) that really screws up system outputs.

    I agree that the output format is stable enough to wrap around. The actual keys being returned however, may or may not exist depending on the system.

    Here's an example as run from a very small lab compute node:

    MemTotal=49411856 kB&MemFree=12990084 kB&Buffers=50108 kB&Cached=18053572 kB&SwapCached=0 kB&Active=23998864 kB&Inactive=11061504 kB&Active(anon)=16925128 kB&Inactive(anon)=32508 kB&Active(file)=7073736 kB&Inactive(file)=11028996 kB&Unevictable=0 kB&Mlocked=0 kB&SwapTotal=0 kB&SwapFree=0 kB&Dirty=39980 kB&Writeback=0 kB&AnonPages=16956872 kB&Mapped=17432 kB&Shmem=712 kB&Slab=753492 kB&SReclaimable=111316 kB&SUnreclaim=642176 kB&KernelStack=4280 kB&PageTables=72620 kB&NFS_Unstable=25812 kB&Bounce=0 kB&WritebackTmp=0 kB&CommitLimit=24705928 kB&Committed_AS=31388720 kB&VmallocTotal=34359738367 kB&VmallocUsed=273076 kB&VmallocChunk=34334057596 kB&HardwareCorrupted=0 kB&AnonHugePages=710656 kB&HugePages_Total=0&HugePages_Free=0&HugePages_Rsvd=0&HugePages_Surp=0&Hugepagesize=2048 kB&DirectMap4k=8368 kB&DirectMap2M=50313216 kB&
    

    Yet, if I run the same thing on one of my lab storage nodes:

    MemTotal=32878228 kB&MemFree=413084 kB&Buffers=4024 kB&Cached=17561892 kB&SwapCached=0 kB&Active=8832776 kB&Inactive=8905636 kB&Active(anon)=84140 kB&Inactive(anon)=88836 kB&Active(file)=8748636 kB&Inactive(file)=8816800 kB&Unevictable=0 kB&Mlocked=0 kB&SwapTotal=16506872 kB&SwapFree=16506872 kB&Dirty=11732 kB&Writeback=36 kB&AnonPages=172684 kB&Mapped=8004 kB&Shmem=348 kB&Slab=12113116 kB&SReclaimable=486316 kB&SUnreclaim=11626800 kB&KernelStack=3136 kB&PageTables=3940 kB&NFS_Unstable=0 kB&Bounce=0 kB&WritebackTmp=0 kB&CommitLimit=32945984 kB&Committed_AS=571324 kB&VmallocTotal=34359738367 kB&VmallocUsed=2702124 kB&VmallocChunk=34357029944 kB&HardwareCorrupted=0 kB&AnonHugePages=61440 kB&HugePages_Total=0&HugePages_Free=0&HugePages_Rsvd=0&HugePages_Surp=0&Hugepagesize=2048 kB&DirectMap4k=7872 kB&DirectMap2M=33546240 kB&
    

    Or if I run the same from one of my lab virtual machines:

    MemTotal=1017972 kB&MemFree=826748 kB&MemAvailable=814464 kB&Buffers=1080 kB&Cached=80060 kB&SwapCached=0 kB&Active=73148 kB&Inactive=60140 kB&Active(anon)=52320 kB&Inactive(anon)=6484 kB&Active(file)=20828 kB&Inactive(file)=53656 kB&Unevictable=0 kB&Mlocked=0 kB&SwapTotal=0 kB&SwapFree=0 kB&Dirty=176 kB&Writeback=0 kB&AnonPages=52204 kB&Mapped=21392 kB&Shmem=6640 kB&Slab=33356 kB&SReclaimable=13568 kB&SUnreclaim=19788 kB&KernelStack=784 kB&PageTables=3468 kB&NFS_Unstable=0 kB&Bounce=0 kB&WritebackTmp=0 kB&CommitLimit=508984 kB&Committed_AS=272976 kB&VmallocTotal=34359738367 kB&VmallocUsed=12992 kB&VmallocChunk=34359717928 kB&HardwareCorrupted=0 kB&AnonHugePages=6144 kB&HugePages_Total=0&HugePages_Free=0&HugePages_Rsvd=0&HugePages_Surp=0&Hugepagesize=2048 kB&DirectMap4k=42996 kB&DirectMap2M=1005568 kB&
    

    Note that these are all running CentOS 6.5 x86_64, and all with the stock kernel.


    So of course it depends on the loaded kernel and kernel modules.

  • @iKeyZ said:
    mpkossen This thread can be closed. :)

    Just flag and it'll be locked, done it for you already. ;-)

  • KuJoeKuJoe Member, Host Rep
    edited August 2014

    GoodHosting said: You actually have a very good point there, it has turned into something where almost anyone can be a "Developer" or "Systems Administrator" just with some good Google-fu.

    Yup, I've written both a SolusVM and WHMCS (to a much lesser extent) replacement thanks to Google and I didn't know you could POST using anything other than PHP. I just use libraries for the important stuff. :)

  • Closed at the request of the thread starter.

This discussion has been closed.