advanced capstone 3.2

 

for 3.2 we are asked to load in the text data and then apply the SHA-1 to the password column. I can get the data loaded in perfectly as above, but then i try to split the strings up with the vs function and im not getting any changes. My intention is to split up the lines and then create a table. Is there an easier way to create a table in this case rather than reading in the lines as strings first?

 

vs does not operate on vectors of strings. You want vs["\\"] each

Sure. The "\t"s you see in the text are Tab characters: this is a tab-delimited CSV. Read it using Load CSV but with a Tab char instead of a comma.

 

q)flipusrpwdaccess!("***";"\t")0::users.txt usr pwd access ----------------------------------------------------------- “user” “password” “api” “jmurphy” “bahrain22” “all” “psmith” “ilovelewisham” “all” “ataylor” “redbulldoesntgivewings” “all” “twilson” “letmewinonce” “all” “fiauser” “getmeallthedata” “t.fia.getSummaryReport”

 

 

Oops. The delimiter is Tab! And perhaps apply vs' as a binary. So:

 

q)flipusrpwdaccess!flip"\t"vs'read0:users.txt usr pwd access ----------------------------------------------------------- “user” “password” “api” “jmurphy” “bahrain22” “all” “psmith” “ilovelewisham” “all” “ataylor” “redbulldoesntgivewings” “all” “twilson” “letmewinonce” “all” “fiauser” “getmeallthedata” “t.fia.getSummaryReport”

 

 

thank you, using the above i got the data loaded in correctly and i got the table into the correct format, however still failing the testsection test:

 

also when i attempt the test functions they pass, so very unsure what the issue is

 

i found the issue, i needed to omit the first row there that reads across as user,password,api as those were the headings for the columns in the text file but we accidentally had them added as table data. Thank you for all your help.

Oops. How did I miss that the first line contains column heads? No need to remove them. Load CSV 0: is what you need. 

 

q)(“***”;enlist"\t")0:`:users.txt user password api ----------------------------------------------------------- “jmurphy” “bahrain22” “all” “psmith” “ilovelewisham” “all” “ataylor” “redbulldoesntgivewings” “all” “twilson” “letmewinonce” “all” “fiauser” “getmeallthedata” “t.fia.getSummaryReport”

 

This is the answer you should have had right away. Sorry.

Recommended: review the article on File Text.

thank you