Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: ghostdog74
2,106
Posted By ghostdog74
(g)awk awk -F. 'length($2)==6{t++}END{print...
(g)awk

awk -F. 'length($2)==6{t++}END{print t}' file
13,235
Posted By ghostdog74
no need. hint: ?[0-9]*
no need. hint: ?[0-9]*
2,394
Posted By ghostdog74
maybe try this? freq[i]++ awk...
maybe try this?

freq[i]++


awk automatically use delimiter of spaces by default.
103,844
Posted By ghostdog74
sed '1i yourline' file
sed '1i yourline' file
73,431
Posted By ghostdog74
bash while read -r line do echo...
bash

while read -r line
do
echo ${line:(-4)}
done < "file"
44,900
Posted By ghostdog74
sed -i '1i add here' file*bat
sed -i '1i add here' file*bat
19,528
Posted By ghostdog74
sed '$d' file | sed '$d'
sed '$d' file | sed '$d'
44,563
Posted By ghostdog74
if you have gawk awk --non-decimal-data...
if you have gawk

awk --non-decimal-data '{print ("0x"$1)+0 " " ("0x"$2)+0}' file

output:

# awk --non-decimal-data '{print ("0x"$1)+0 " " ("0x"$2)+0}' file
20000 1141
10000 271
30000 27042...
6,125
Posted By ghostdog74
The best way to capture user commands, is to turn...
The best way to capture user commands, is to turn on auditing.
in Solaris, you can turn on BSM. In red hat , there should be similar mechanism (auditd). pls check your red hat documentation....
359,721
Posted By ghostdog74
string="abc@hotmail.com;xyz@gmail.com;uvw@yahoo.co...
string="abc@hotmail.com;xyz@gmail.com;uvw@yahoo.com"
var=$(echo $string | awk -F";" '{print $1,$2,$3}')
set -- $var
echo $1
echo $2
echo $3

output:

# ./test.sh
abc@hotmail.com...
8,603
Posted By ghostdog74
grep "active=true" file | cut -d"."...
grep "active=true" file | cut -d"." -f1
4,398
Posted By ghostdog74
change="User_Alias SOME_ADMINS = user1" awk -v...
change="User_Alias SOME_ADMINS = user1"
awk -v c="$change" '{print}
/User alias specification/{print c}
' "file" > temp
mv temp file
2,193
Posted By ghostdog74
why are you doing his homework in full ?
why are you doing his homework in full ?
7,529
Posted By ghostdog74
awk -vvar=$VAR '{print var;print $0}' file
awk -vvar=$VAR '{print var;print $0}' file
1,187
Posted By ghostdog74
awk '{for(i=1;i<=8;i++){$i=""};}1'...
awk '{for(i=1;i<=8;i++){$i=""};}1' file
1,187
Posted By ghostdog74
you should Franklin's solution. nawk ...
you should Franklin's solution.

nawk '{sub(".*"$8 FS,"");gsub(" ","_")}1' file
3,014
Posted By ghostdog74
won't work if there are strings like "nap", "NAG"...
won't work if there are strings like "nap", "NAG" etc.
4,219
Posted By ghostdog74
awk 'NR!~/^(1[0-3]|4[5-7])$/' file
awk 'NR!~/^(1[0-3]|4[5-7])$/' file
14,403
Posted By ghostdog74
Have you checked CPAN? Else you can program it in...
Have you checked CPAN? Else you can program it in Perl, simply for opening another file for appending and writing to this file in addition to printing to the screen
Forum: IP Networking 05-29-2009
36,337
Posted By ghostdog74
windows ftp client doesn't cut it. if you want,...
windows ftp client doesn't cut it. if you want, go download an ftp client for windows that support specifying a port number. Or, you can use a programming language such as Perl or Python with their...
Showing results 1 to 20 of 20

 

Featured Tech Videos

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