Find Jobs
Hire Freelancers

Convert Shell Script Functions to C#

$100-750 USD

Anulat
Data postării: peste 6 ani în urmă

$100-750 USD

Plata la predare
I have about 40 functions in shell script with most of the code being regex. I need them to be converted to C#, including all the logic on them. Most of them are simple as the sample below. The payment will be split in 3 Milestones: - 1) 2 Functions. To double check everything is been done in the way it should be. - 2) 18 functions - 3) 20 functions The code must be very well commented/documented explained the logic on the regular expressions and logic. The code must have unit tests, based on the input samples that will be made available. The code must be on a git repository provided by me and code pushed daily. I need this done ASAP. Sample: Original: check_fstab_partition_options() { local ID="$1" local dir=`echo "$2" | sed "s/\/\{0,\}[ \t]\{0,\}$//g"` local option="$3" local filename="./fstab" local line="" [ ! -s "$filename" ] && return local check_missing_shares=`cat $filename | egrep -v "^[[:blank:]]*#|^[[:blank:]]*$" | awk '{ print $2 }' | sed "s/\/\{0,\}[ \t]\{0,\}$//g" | sort -u | egrep -w $dir` [ -z "$check_missing_shares" ] && { return } local shares_and_options=`cat $filename | egrep -v "^[[:blank:]]*#|^[[:blank:]]*$" | awk '{ print $2";"$4 }' | tr " " "\n"` for line in ${shares_and_options}; do local share=`echo "$line" | cut -d";" -f1 | sed "s/\/\{0,\}[ \t]\{0,\}$//g"` [ -n "$share" -a -n "$dir" ] && [ "$share" == "$dir" ] && { local result=`echo "$line" | cut -d";" -f2 | egrep -w "$option"` [ -z "$result" ] && { verify "$ID" "1" return } } done } func_311() { check_fstab_partition_options "4650" "/tmp" "nodev" } Converted: public static string CheckFstabPartitionOptions(NixInstance instance, string partition) { var file = [login to view URL]("fstab"); if (file != null) { string _dir = [login to view URL](partition, "/", @"\/"); string _file = [login to view URL](file, @"^[\s\t#].*", [login to view URL], [login to view URL]); string expr = [login to view URL](@" ", new string[] { @".*", _dir, @".*" }); Match matchLine = [login to view URL](file, expr, [login to view URL]); if ([login to view URL]) { string line = [login to view URL]([login to view URL], @"[\s\t]{1,}", " "); string[] _line = [login to view URL](' '); if ([login to view URL]() >= 3) { return _line[3]; } } } return [login to view URL]; } func_311(){ var options = CheckFstabPartitionOptions(instance, "/tmp"); if (![login to view URL](options)) { if (![login to view URL](options, "nodev", [login to view URL])) { Verify(options); } } }
ID-ul proiectului: 15029123

Despre proiect

12 propuneri
Proiect la distanță
Activ: 7 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte

Despre client

Steagul UNITED STATES
davie, United States
5,0
2
Membru din mar. 4, 2013

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.