Search Results

Search: Posts Made By: Lord Spectre
8,828
Posted By Peasant
Please, do post your attempts and efforts,...
Please, do post your attempts and efforts, including operating system and shell details in future.

We would like to see how far you got before helping.

See if this helps you get started...

...
Forum: Red Hat 07-11-2018
9,005
Posted By hicksd8
Download Intel(R) Network Adapter Driver for...
Download Intel(R) Network Adapter Driver for 82575/6, 82580, I350, and I210/211-Based Gigabit Network Connections for Linux*...
1,503
Posted By RudiC
awk '/down$/ {T[$14]++} END {for (t in T) print...
awk '/down$/ {T[$14]++} END {for (t in T) print t+0, T[t]/3}' OFMT="%.f" Event.log*

I'd propose to consult man awk as well.
1,503
Posted By RudiC
Pipe through sort -k2,2rn
Pipe through sort -k2,2rn
1,503
Posted By MadeInGermany
cat Event.log* | awk 'sub(".*SERVICEDOWN-","") &&...
cat Event.log* | awk 'sub(".*SERVICEDOWN-","") && sub("[^0-9].*","") {A[$0]++} END {for (a in A) print a,A[a]}'
1,503
Posted By RudiC
How aboutawk '{T[$14]++} END {for (t in T) print...
How aboutawk '{T[$14]++} END {for (t in T) print t+0, T[t]}' file
41084 3
41289 1
41283 1
41083 3
Forum: Programming 03-20-2015
1,864
Posted By durden_tyler
test@PDBORA12C> test@PDBORA12C> -- ...
test@PDBORA12C>
test@PDBORA12C> --
test@PDBORA12C> with t (field1, field2, field3) as
2 (
3 select 1234567314, 333776543585218, 333771434591151 from dual union all
4 select...
2,324
Posted By zaxxon
$ awk '!_[$1 $4]++' infile Region ...
$ awk '!_[$1 $4]++' infile
Region 23/11/2014 09:11:36 41752
Medio 23/11/2014 03:11:38 4132
Info 23/11/2014 05:11:09 4323
Test 23/11/2014...
Forum: Programming 11-26-2014
992
Posted By RudiC
To have at least one letter somewhere in your...
To have at least one letter somewhere in your field, try "^.*[A-Za-z].*$"

EDIT: Sorry, misread your post. Try"^[[:alnum:]]*[A-Za-z][[:alnum:]]*$" but remove the windows style <CR> line terminators...
Forum: Programming 11-26-2014
992
Posted By RavinderSingh13
Hello Lord Spectre, Following may help you...
Hello Lord Spectre,

Following may help you in same. It is just an example.


echo "121221qdsdwd dejcw23132c" | awk '{if($1 ~ /^[[:digit:]]*$/){next} else {print $0}}'


Output will be as...
1,284
Posted By SriniShoo
printf "%-5s %05s %5d\n" $next $Server...
printf "%-5s %05s %5d\n" $next $Server $Client
8,968
Posted By bartus11
awk '{c[$1]++}END{for (i in c) if (c[i]>100)...
awk '{c[$1]++}END{for (i in c) if (c[i]>100) print i,c[i]}' access_log | sort -nrk2
8,968
Posted By bartus11
awk '{c[$1]++}END{for (i in c) if (c[i]>100)...
awk '{c[$1]++}END{for (i in c) if (c[i]>100) print i,c[i]}' access_log
8,968
Posted By bartus11
Try:awk '{c[$1]++}END{for (i in c) print i,c[i]}'...
Try:awk '{c[$1]++}END{for (i in c) print i,c[i]}' access_log
Forum: Programming 10-05-2013
2,043
Posted By durden_tyler
mysql> mysql> select * from users; ...
mysql>
mysql> select * from users;
+-------+-----------+
| name | logged_ip |
+-------+-----------+
| user1 | 127.0.0.1 |
| user2 | 127.0.0.2 |
| user3 | 127.0.0.3 |
| user4 | 127.0.0.1 |
|...
8,262
Posted By Scott
SELECT row1, CONCAT( row1, '<br />', row2 ) ...
SELECT row1, CONCAT( row1, '<br />', row2 )
FROM sometable
4,893
Posted By durden_tyler
Oracle and PostgreSQL have nice techniques to...
Oracle and PostgreSQL have nice techniques to generate a series of unique numbers, one per line.
Unfortunately MySQL doesn't, so create a view with a pre-defined number of rows and use it to join...
83,478
Posted By Yoda
showlog | grep "^1266\."
showlog | grep "^1266\."
83,478
Posted By RavinderSingh13
Hello, Could you please try the...
Hello,


Could you please try the following and let me know if this helps.


1st way:


$ cat grep_starting | grep '^1266*'

1266.1369866124 ::
1266.1304711286 ::
1266.333792515 ::...
8,021
Posted By Yoda
If you don't have fuser then lsof is another...
If you don't have fuser then lsof is another option:
for cap_file in tcpdump*.cap
do
if lsof -f -- "$cap_file" > /dev/null
then
printf "File: $cap_file currently...
8,021
Posted By Scrutinizer
Try: fuser -- file
Try:
fuser -- file
1,557
Posted By RudiC
That would be an interesting question. awk will...
That would be an interesting question. awk will need to go through the entire file to the end to be sure it picks the last number wanted. With tac, you could take the first one and quit. BUT - tac...
1,557
Posted By RudiC
$ awk 'match ($0, "->") {gsub (/^.*>|[^0-9].*$/,...
$ awk 'match ($0, "->") {gsub (/^.*>|[^0-9].*$/, ""); TMP=$0} END{print TMP}' file
3101902
1,557
Posted By ctsgnb
Depending on your OS you could also give a try to...
Depending on your OS you could also give a try to :
tac gclog.txt | sed '/-/!d;s/.*>//;s/K.*//;q'
or
tail -r gclog.txt | sed '/-/!d;s/.*>//;s/K.*//;q'

Should be faster because starting from end...
3,293
Posted By alister
Using process substitution: grep '\.DAT$'...
Using process substitution:
grep '\.DAT$' <(comm -23 <(ls log) <(ls log/sync))

A more traditional, more readable approach:
ls log > a
ls log/sync > b
comm -23 a b | grep '\.DAT$'

Regards,...
Showing results 1 to 25 of 87

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