Jump to content

Text file lo una okka word, output display avvali


kskumar

Recommended Posts

Just now, kskumar said:

 try chesa...naa system lo cannot be loaded the execution of  scripts is disabled on this system ani ochindi...

First Open PowerShell as Administrator and Run : Set-ExecutionPolicy Unrestricted or Set-ExecutionPOlicy RemoteSigned

Link to comment
Share on other sites

8 minutes ago, Maryadaramanna said:

Paste the data in excel; so, u'll receive these lines in separate rows

2016-05-17 09:32:37.000000: EXEC sp_web_logLogin4 @UserName = 'abcd', @PW = 'xy344', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 

2016-05-17 08:58:50.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'cdef', @PW = 'xy344', @IP = '11.11.11.1', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 

2016-05-17 09:07:09.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'qqqqq', @PW = 'wwwww', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 

 

Then,

1. go to "Data" (Next to Home, Insert, Formulas in excel) and look for text to columns

2. Select "Delimited", press Next

3. Use the delimiter "=" (select "Other" and give = as the option), press Next

4. Finish

U'll get the data in various columns separated by = and all the Usernames will come in a single column, as long as your format is unique 

output ela vachindi:  'abcd', @PW 

@PW remove cheyali how?

 

Link to comment
Share on other sites

15 minutes ago, graham said:

Open notepad, save these lines as something.ps1

$content = Get-Content C:\notepad.txt #This is your notepad with all the info
for($i= 0; $i -lt $content.Length ; $i++)
{
    $content[$i].Split("@")[1] | Out-File C:\Usernames.txt -Append
}

Open PowerShell and run that something.ps1

Idi run cheyi, tarvata C:\usernames.txt chudu.  Let me know if you need help

good one. I reaally appreciate u

Link to comment
Share on other sites

6 minutes ago, graham said:

Set-ExecutionPolicy Unrestricted or Set-ExecutionPOlicy RemoteSigned

i got below error

set-execution policy: cannot bind parameter 'scope' cannot convert value or to type miscrosoft powershell execution.

Link to comment
Share on other sites

Just now, kskumar said:

i got below error

set-execution policy: cannot bind parameter 'scope' cannot convert value or to type miscrosoft powershell execution.

excel tho pani aipoyindi kada, hard to debug without seeing what you are doing. usually powershell execution policy set ani net lo vethikite vastundi..but u already have what you want from excel way kada.

Link to comment
Share on other sites

9 minutes ago, kskumar said:

output ela vachindi:  'abcd', @PW 

@PW remove cheyali how?

 

graham paina cheppadu kada, select the column and follow his steps

Link to comment
Share on other sites

5 minutes ago, graham said:

excel tho pani aipoyindi kada, hard to debug without seeing what you are doing. usually powershell execution policy set ani net lo vethikite vastundi..but u already have what you want from excel way kada.

 

1 minute ago, Maryadaramanna said:

graham paina cheppadu kada, select the column and follow his steps

 

Thanks dude...workout ayendi..thanks alot for your help...

Link to comment
Share on other sites

Java Aithe split by "@Username =" "

use Chey.. So you get string array with 10k size

for loop use Chesi each string Lo first characters till " read chey and vaatini Inko string list Ki add chey.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...