Search Results

Search: Posts Made By: Lord Spectre
11,116
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
10,663
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,619
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,619
Posted By RudiC
Pipe through sort -k2,2rn
Pipe through sort -k2,2rn
1,619
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,619
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,922
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,710
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
1,032
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...
Forum: Programming 11-26-2014
1,032
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...
1,370
Posted By SriniShoo
printf "%-5s %05s %5d\n" $next $Server...
printf "%-5s %05s %5d\n" $next $Server $Client
11,210
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
11,210
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
11,210
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,111
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,378
Posted By Scott
SELECT row1, CONCAT( row1, '<br />', row2 ) ...
SELECT row1, CONCAT( row1, '<br />', row2 )
FROM sometable
5,168
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...
86,201
Posted By Yoda
showlog | grep "^1266\."
showlog | grep "^1266\."
86,201
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,211
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,211
Posted By Scrutinizer
Try: fuser -- file
Try:
fuser -- file
1,665
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,665
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...
1,665
Posted By RudiC
$ awk 'match ($0, "->") {gsub (/^.*>|[^0-9].*$/,...
$ awk 'match ($0, "->") {gsub (/^.*>|[^0-9].*$/, ""); TMP=$0} END{print TMP}' file
3101902
3,372
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 05:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy