Search Results

Search: Posts Made By: chipperuga
1,884
Posted By chipperuga
Perfect, thanks. FYI if anyone needs the screen...
Perfect, thanks. FYI if anyone needs the screen capture script... webkit2png (http://www.paulhammond.org/webkit2png/)
1,884
Posted By chipperuga
Shell Script - Loop through text file
I am trying to capture screenshots from a huge list of URLs. I am able to manually capture images of individual pages; that is, I simply run the following command to get a screenshot of Foo.com...
7,793
Posted By chipperuga
Made some progress, but still need help...
Made some progress, but still need help formatting the output:
$sed -e '/Custodian/b' -e '/Matched File/b' -e '/File Size/b' -e '/Original Path/b' -e d * | sed -e 's/.*= \(.*\) \(.*\)/"\2, \1",/' -e...
7,793
Posted By chipperuga
Sed to parse log file
Hi all, thanks for reading the post.

I'm trying to parse hundreds of log files in a directory. One log file looks similar to below:

Investigator : Jim_Foo
Custodian :...
5,134
Posted By chipperuga
Redirect grep error/result to file
I'm having trouble piping grep results/error to a file. Why can't I redirect these messages into a file?

$ grep -r -o "pattern" * > log
Binary file foo1 matches
Binary file foo2 matches
...
5,794
Posted By chipperuga
Pipe binary file matches grep results to file
I am using grep to match a pattern, but the output is strange.

$ grep -r -o "pattern" *

Gives me:
Binary file foo1 matches
Binary file foo2 matches
Binary file foo3 matches

To find the...
7,490
Posted By chipperuga
awk or grep to match # of words before and after pattern
Pipe binary file matches grep results to file
I am using grep to match a pattern, but the output is strange.


$ grep -r -o "pattern" *


Gives me:

Binary file foo1 matches
Binary file...
7,785
Posted By chipperuga
Interesting. When I open Notepad in Windows and...
Interesting. When I open Notepad in Windows and click on save as, there are 4 options for encoding: ANSI, Unicode, Unicode big endian, UTF-8.

The logs I am referring to are encoded, at least...
7,785
Posted By chipperuga
Not having much luck with dos2unix. How would I...
Not having much luck with dos2unix. How would I change all files in a directory from UNICODE to UTF-8?

Can't get this to work...

dos2unix -f UNICODE -t UTF-8 *
7,785
Posted By chipperuga
Available in a repository? ---------- Post...
Available in a repository?

---------- Post updated at 10:41 AM ---------- Previous update was at 10:38 AM ----------

Thanks for the quick response, @vbe.
7,785
Posted By chipperuga
Convert directory of text files to Unix/Linux Line Ending
I need help converting a directory of *.txt with Windows line ending to UTF-8 character encoding and Unix/Linux line ending.
3,451
Posted By chipperuga
I see, this works. Thank you. sed -e...
I see, this works. Thank you.


sed -e '/custodian/b' -e '/packaged by/b' -e '/package name/b' -e '/Total Data (MB) Read/b' -e '/Begin Time/b' -e d log1.txt |

sed -rn '
/Begin/!{
s/[^=]*=...
3,451
Posted By chipperuga
I did, and I apologize for not following - I'm...
I did, and I apologize for not following - I'm not well versed with sed. Where did file2 come from? How is it matching the regexp I specified?

---------- Post updated at 05:46 PM ----------...
3,451
Posted By chipperuga
@g.pi, I'm still not able to follow.
@g.pi, I'm still not able to follow.
3,451
Posted By chipperuga
I don't understand your instructions.
I don't understand your instructions.
3,451
Posted By chipperuga
Modify sed script and print to csv
I'm trying to take out strings from log files and add them to a csv.

For example, in the directory now, there are 2 log files. I get the following results:

sed -e '/custodian/b' -e '/packaged...
7,677
Posted By chipperuga
How do you remove the space after any "="? ...
How do you remove the space after any "="?

Something like?
awk -F"[':' '= ']"

---------- Post updated at 01:42 PM ---------- Previous update was at 01:21 PM ----------

Is this going to work...
7,677
Posted By chipperuga
user@ubuntu:~/Desktop$ grep -e "\(packaged...
user@ubuntu:~/Desktop$ grep -e "\(packaged by\)\|\(employee\)\|\(file name\)\|\(Total Data (MB) Read\)\|\(Begin Time\)" log.txt
packaged by = Ron Mexico
employee = Michael Vick
file...
7,677
Posted By chipperuga
The date stamp gets jacked up because it removes...
The date stamp gets jacked up because it removes the ":" in the time.

6/13/2011 10

Is it possible to do something like:
awk -F"[:=]" '{print $2,":",print $3,":",print $4}'
7,677
Posted By chipperuga
awk -F"=" '{print $2}' This works, but I...
awk -F"=" '{print $2}'

This works, but I also have ":" in the logs. Any way to combine "=" and ":"?

Thanks for the quick response.
7,677
Posted By chipperuga
Grep syntax print after certain character
My current code is:
user@ubuntu:~/Desktop$ grep -e "\(packaged by\)\|\(employee\)\|\(file name\)\|\(Total Data (MB) Read\)\|\(Begin Time\)" log.txt
packaged by = Ron Mexico
employee =...
10,525
Posted By chipperuga
The dir will look something like this: ...
The dir will look something like this:

/var/log/foologs/
..
foo1.log
foo2.log
foo3.log
foo4.log


I'd like the script to go into each log file, and then append to the CSV.

So if...
10,525
Posted By chipperuga
Yes, it should work. I'll give this a shot. Thank...
Yes, it should work. I'll give this a shot. Thank you for your help.
10,525
Posted By chipperuga
Let's say that each log file looks like this: ...
Let's say that each log file looks like this:

licensed to = Client X
packaged by = Bill Gates
custodian = Steve Jobs
Time Zone = Eastern Standard Time
session name =...
10,525
Posted By chipperuga
Use grep sed or awk to extract string from log file and put into CSV
I'd like to copy strings from a log file and put them into a CSV.

The strings could be on different line numbers, depending on size of log.

Example Log File:

File = foo.bat
Date = 11/11/11...
Showing results 1 to 25 of 25

 
All times are GMT -4. The time now is 09:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy