Search Results

Search: Posts Made By: striker4o
11,677
Posted By striker4o
The example is some dummy command, what I have is...
The example is some dummy command, what I have is a bit more complicated :). Thanks for the suggestions though.
11,677
Posted By striker4o
Thanks. I actually came up with: cat test.txt |...
Thanks. I actually came up with:
cat test.txt | uniq -c | sort -rn | awk 'int($1)>=5'

5 can be replaced with any value
11,677
Posted By striker4o
Show "uniq -c" results only for more than X occurrences
Say I have test.txt with the following data:
user1 mailbox11 IP1
user1 mailbox12 IP2
user2 mailbox21 IP1
user3 mailbox31 IP1
user1 mailbox11 IP1
user1 mailbox11 IP1
user1 mailbox11 IP1
user1...
1,669
Posted By striker4o
Thanks. The problem was actually indeed due to...
Thanks. The problem was actually indeed due to unescaped characters (stupid double quotation for the variable to work). However, it were the quotes that I needed to escape:

Not working:
find ....
1,669
Posted By striker4o
variables with dots and using double quoted sed?
Here is my script:

1 #!/bin/bash
2
3 new() {
4 list=$(find . -name '*.html' -or -name '*.htm' -or -name '*.php' -type f| xargs awk -F\" -v RS='<' '/^iframe src=/ {print $2}'|sed...
15,313
Posted By striker4o
the purpose of sleep 3 & is examplatory
the purpose of sleep 3 & is examplatory
15,313
Posted By striker4o
Yeah, thanks for that. Here is what I got going: ...
Yeah, thanks for that. Here is what I got going:

So I will be using

find . -name '*.html' -or -name '*.htm' -or -name '*.php' -type f| xargs awk -F\" -v RS='<' '/^iframe src=/ {print $2}'|sed...
15,313
Posted By striker4o
Yes, thank you. Appears cleaner now, although I...
Yes, thank you. Appears cleaner now, although I prefer to use sort -u instead of the if.

For now I use the following:

find . -name '*.html' -or -name '*.htm' -or -name '*.php' -type f| xargs...
15,313
Posted By striker4o
I apologize. Thank you for the commands. I just...
I apologize. Thank you for the commands. I just noticed the one which appears to do the job:

find . -name "*php*" -or -name "*htm*" |
xargs awk -F\" -v RS='<' '/^iframe src=/ {...
15,313
Posted By striker4o
To get rid of the (is a directory) error I...
To get rid of the (is a directory) error I guess... could be just *

however, would you bear with me for a while longer:


Your command did get me going. however, my examples were only of alike...
15,313
Posted By striker4o
Yeah, thanks. I sorted out "sort -u" almost...
Yeah, thanks. I sorted out "sort -u" almost immediately after my dumb question :D

So here is the finalist:

find . -name "*php*" -or -name "*htm*" -type f| awk '/http/' RS=\" *.* | sort -u
15,313
Posted By striker4o
That never occurred to me. Thanks, it works very...
That never occurred to me. Thanks, it works very well. However, the output is:

http://ADDRESS_1/?click=5BBB08\
http://ADDRESS_2/?click=5BBB08\
http://ADDRESS_3/?click=5BBB08\...
15,313
Posted By striker4o
Awk: print all URL addresses between iframe tags without repeating an already printed URL
Here is what I have so far:

find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}'

Here is an example content of a PHP or...
24,548
Posted By striker4o
echo "AAAGGG" | sed -e...
echo "AAAGGG" | sed -e 's/AA/0/g;s/AG/1/g;s/GG/2/g;'

Output:
012

echo "AAGGAGAGAGAGAGGAGAGGGAG" | sed -e 's/AA/0/g;s/AG/1/g;s/GG/2/g;'

Output:
0211111G1121

echo "AA AGG GG" | sed -e...
1,213
Posted By striker4o
I skipped that one Here it is: for i in...
I skipped that one

Here it is:

for i in `find . -name "7*.TXT" -print | xargs grep -l "FROM=TESTFILE.DATA;TO="`; do cp $i ./tmp/ ; done

Note: there must be a "tmp" folder in the working...
1,213
Posted By striker4o
try using grep -l like so: find . –name...
try using grep -l
like so:

find . –name "7*.TXT" -user user2 -mtime -1 –print | xargs grep -l “FROM=TESTFILE.DATA;TO=”
Forum: Open Source 02-28-2012
335,677
Posted By striker4o
As a guy working only in the terminal, I got used...
As a guy working only in the terminal, I got used to vi(m) , as the majority :)
1,668
Posted By striker4o
You cannot know for sure how many times a file...
You cannot know for sure how many times a file has been modified, unless you keep a record of some sort (e.g. you have a log for each occurrence of a file modification. Assuming each entry is on a...
Showing results 1 to 18 of 18

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