[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>want to write a bash script >argument parsing in bash

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 3

File: 1473435312251.jpg (56KB, 358x429px) Image search: [Google]
1473435312251.jpg
56KB, 358x429px
>want to write a bash script
>argument parsing in bash is fucking trash so i just do it in node javascript
>>
>>57252735
>just do it node javascript
>node javascript
>node

This is bait, right? No one would use node javascript when they have perl.
>>
>>57252749
I never learned pearl
>>
look up python
>>
>>57252757
It's time to fuckin learn some perl then
Scripting language of champions
>>
>>57252800
what advantages does it have over javascript running from within V8 runtime environment?
>>
>argument parsing in bash

while getopts "fnjbhxzgmuvcys:i:r:" option
do
case $option in
h ) helptext
exit 0
;;
v ) echo $SCRIPTVERSION
exit 0
;;
c ) cleanarchive
exit 0
;;
i ) PACKAGENAME=${OPTARG}
;;
u ) update
exit 0
;;
s ) PACKAGENAME=${OPTARG}
findpackage
exit 0
;;
f ) SKIPCHECK="1"
;;
g ) SKIPBUILD="1"
;;
n ) SKIPDEP="1"
;;
m ) SKIPINSTALL="1"
;;
z ) MDCHECK="1"
;;
x ) PARSESLACK=1
;;
* ) noopts
exit 0
;;
esac
done

Literally the easiest thing ever. Why are you so trash?
>>
>>57253522
>
getopts

'no'
>>
File: 200_s.gif (14KB, 250x200px) Image search: [Google]
200_s.gif
14KB, 250x200px
>>57253620
>'no'
>>
>>57252735
Is Node.JS just as useful in a GNU/Linux environment like Python is?
>>
>>57252814
its not botnet
>>
>>57252735
>>57252749
>node javascript
>perl
try python faggots
>>
I've used PHP for some quick scripts.

It just has such a big library of functions that (sometimes) do what you want.
>>
>>57252735
Couldn't you choose something shittier for your scripts? Jesus fuck these webdevs.
>>
>>57252735
there is no shame in writing little cli tools in node. I do it all the time.

They are more portable than python and bash ones.
>>
File: orangoutan.jpg (25KB, 579x329px) Image search: [Google]
orangoutan.jpg
25KB, 579x329px
I used C to write a bash script.
>>
>>57254323
so you wrote a C program that would write your bash script?
>>
>>57254479
Yes
>>
>>57252735
what do you mean by argument parsing?
>>
>>57253620
what's wrong with getopts?
Thread posts: 20
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.