Contact us - +12567847275

print “”{“” (5) “”}

Complete the CGI script (by filling in the five blanks) which produces in JSONformat data on all the

executablefiles that are in the Unix directory provided as a URL parameter. NR: line number

NF: number of fields in a record Example JSON string:

[

{

“file_name”:”main.sh”,

“user”:”tom”,

“group”:”root”,

“size”:”1024″,

“date”:”2018-11-1″

},

{

“file_name”:”main.sh”,

“user”:”tom”,

“group”:”root”,

“size”:”1024″,

“date”:”2018-11-1″

},

]

File 1: ls2json.cgi

#!/bin/sh

echo Content-Type: application/json; echo directory=”$QUERY_STRING”

( echo “permissions links user group size date time time_offset file_name” ; ( ls -l –full-time $directory

| awk ’ (1) {print (2) }’ ) ) | ./txt2json

File 2: txt2json

#!/bin/sh awk ’NR==1 {

print “[“

for (i=1;i<=NF; i++) name[i]=$i; n=NF

next

} NF>=n {

for ( (3) )

$i=””” name[i] (4) $i “”””

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.