Converting tomcat logs to CSV using sed

Issue I have some application log data on a Linux server, which looks like this: Jan 11 14:24:42 AttackSimulator.abcd [1587566256,49294,"ryan.wright@abcd.com",3237159933,1,0,0,3,"2314","https",443,2899903330,"https://googleads.g.doubleclick.net/pagead/ads",0,"","","","","1 – Default Policy","","googleads.g.doubleclick.net","GET",4,0,5] Jan 11 14:24:42 AttackSimulator.abcd [1587566256,49294,"melisa.zeunert@abcd.com",3237159933,1,0,0,3,"2339,37788","http",80,387803624,"http://ping.citrix.com",0,"","","","","3 – Extended Policy High","","ping.citrix.com","HEAD",3,0,4] I want to output this in a CSV

Continue reading

Execute PowerShell Script from C# with Commandline Arguments

Issue I need to execute a PowerShell script from within C#. The script needs commandline arguments. This is what I have done so far: RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration); runspace.Open(); RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace); Pipeline pipeline

Continue reading

shell change date within a string

Issue I found some sed examples for my dilemma. current text file is like below. 076411-160DL 0000000052220420 000005212635883-0003-0 138574A 0000000120220421 000012012630637-0003-1 146054A 0000000420220422 000042012634007-0003-1 138575A 0000000240220421 000024012630638-0003-1 145683C 0000000145220422 000014512634671-0003-1 137611B 0000000130220419 000013012632286-0003-0 137618C 0000000120220420 000012012635623-0003-0 I am only changing

Continue reading

Git log tabular formatting

Issue I have a simple alias to display few last commits: log –pretty=format:’%h %an %s’ -10 How can I make the results to be displayed in columns, like this: 898e8789 Author1 Commit message here 803e8759 Other Author name Commit message

Continue reading

Merging 2 scripts

Issue I’ve been tasked with compiling a list of all our security groups and grabbing specific information about these groups but I cannot for the life of me figure out how to get all the information onto one Csv. This

Continue reading

IF + AND Statements

Issue I have a ‘Current Result’ in the form of a data frame in Python (depicting in Excel as an illustration). I’d like to add a column that classifies whether a row is a ‘PRIME’ or an ‘ALT’ designation. The

Continue reading

Spawn actor from class in Unreal Engine using Python

Issue Using Blueprint, I can SpawnActorFromClass with a StaticMeshActor, but with a Python script via the builtin Python Script plugin, unreal.EditorLevelLibrary().spawn_actor_from_class(ue.Class(name=’StaticMeshActor’), location, rot) I got: LogPython: Error: TypeError: EditorLevelLibrary: Failed to convert parameter ‘actor_class’ when calling function ‘EditorLevelLibrary.SpawnActorFromClass’ on ‘Default__EditorLevelLibrary’

Continue reading

PHP while loop add by 2

Issue Currently I have a code that looks like: for ($i=0; $i<=($num_newlines – 1); $i++) { $tweetcpitems->post(‘statuses/update’, array(‘status’ => wordFilter(“The item $parts[$i] has been released on Club Penguin. View it here: http://clubpenguincheatsnow.com/tools/swfviewer/items.swf?id=$parts[$id]”))); sleep(90); } What I want to do make

Continue reading