Search Results

Search: Posts Made By: devtakh
2,772
Posted By devtakh
# sort -k2 testfile MARCH6 MARCH2 MARCH2...
# sort -k2 testfile

MARCH6 MARCH2
MARCH2 MARCH326
MARCH9 MARCH4
MARCH1 MARCH5
MARCH821 MARCH7


cheers,
Devaraj Takhellambam
2,239
Posted By devtakh
tr '\n' ' ' < file2 | awk 'BEGIN{IFS=OFS=" "}{ ...
tr '\n' ' ' < file2 | awk 'BEGIN{IFS=OFS=" "}{
for (i=1;i<=NF;i++){
if ( i == 1 )printf("%s ",$1);
else { if ( $i != $(i-1))printf("\n%s ",$i);
else printf("%s...
3,301
Posted By devtakh
awk 'NF && NF>1{print; exit}'...
awk 'NF && NF>1{print; exit}' ASCENTRIC_TRADE_2.txt


cheers,
Devaraj Takhellambam
1,841
Posted By devtakh
I will let you figure out how to put a 0 when...
I will let you figure out how to put a 0 when there is no data.

$ awk 'BEGIN{while (getline < "file1"){ map[$1]=$2 }}{x=map[$1];if ($1 in map){map[$1]=x" "$2}}END{for (i in map){print i,map[i]}}' ...
3,416
Posted By devtakh
Try using: if [ `echo $c | grep -e "[a-z]"`...
Try using:

if [ `echo $c | grep -e "[a-z]"` ] ; then
echo "found"
else
echo "no found"
fi


cheers,
Devaraj Takhellambam
2,150
Posted By devtakh
Try using print command with the right format. ...
Try using print command with the right format.

$ echo $a
-000023.44
$ printf "%2.8f" $a
-23.44000000


cheers,
Devaraj Takhellambam
1,657
Posted By devtakh
Unix Log out time
Hi,

Is there a way to find out the logout date for a user who has been logged in to the system for more than 1 day. For example, the below user as indicated by the "last" command had logged into...
Forum: SuSE 08-05-2011
7,005
Posted By devtakh
SUSE 11.4 sar monitoring not run by default.
Hi,
I had installed sysstat package below on a SUSE 11.4 box. I can see the sysstat cron file listed under the directory /etc/sysstat. However, it looks like the sysstat sar monitor is never run at...
28,996
Posted By devtakh
Determine the ethernet (NIC) card speed.
Hi,

Does anyone know how can I determine the maximum capable speed on a network interface card for different OS like HP, Sun, AIX and Linux.
I am aware of the tool "ethtool" which can be used for...
2,436
Posted By devtakh
Perl module script to draw speedometer/gauge graphs
Hi,

Has anyone used any perl modules to draw dashboard/gauge graphs similar to a speedometer? I am looking to create some graphs in perl. Please share your thoughts if there are any modules and an...
2,772
Posted By devtakh
Perl - radio button processing
Hi,
I am hoping to get some help on perl. I am trying to process a HTML radio button selected value in perl. Basically What I am trying to do is

1. I have some radio buttons which indicated...
4,949
Posted By devtakh
Monitor % utilization of the network card
Hello,

How to we typically monitor the % of utilization of network cards on a Unix box,basically the % utilization of the bytes transfered of the network card. This is required on all the flavours...
1,403
Posted By devtakh
Linux Distribution of sysstat versions
Hello,

Is there any place or specific site where I can find the "Sysstat versions" by Linux distributions. I have a sample data collected but wasn't sure if there is a specific place to gather...
4,486
Posted By devtakh
Odd but $ awk -F "from " '{print...
Odd but
$ awk -F "from " '{print substr($2,index($2,".")+1,index($2," ")-index($2,"."))}' file1

cheers,
Devaraj Takhellambam
4,486
Posted By devtakh
try awk -F "." '{print substr($2,0,index($2,"...
try
awk -F "." '{print substr($2,0,index($2," "))}' file1

or

awk -F "." '{print $2}' file1 | awk '{print $1}'

cheers,
Devaraj Takhellambam
4,486
Posted By devtakh
$ awk -F "." '{print $2}' file1 Table_Name1 ...
$ awk -F "." '{print $2}' file1
Table_Name1
Table_Name2
Table_Name3
Table_Name4


cheers,
Devaraj Takhellambam
46,797
Posted By devtakh
Most welcome $ - will match if the line has...
Most welcome

$ - will match if the line has <\college> as the last string in the line and nothing else
and .* - will match even if there are other strings in the line after </college>
FYI,
^...
46,797
Posted By devtakh
ok use this instead. It is always good to give a...
ok use this instead. It is always good to give a sample I/P when you are requesting a solution as it will help us to see the data.

sed 's/.*<college>\(.*\) <\/college>.*/\1/'
46,797
Posted By devtakh
sed is matching the whole line and segragating...
sed is matching the whole line and segragating the only string within the <college> and </college>. As you can see, that is enclosed with the operators \( and \). The string inside this operator is...
6,071
Posted By devtakh
Awk: awk -F ": " '/<HEADER>/,/<\/HEADER>/{ ...
Awk:

awk -F ": " '/<HEADER>/,/<\/HEADER>/{
if($0 ~ /IP/){ip=$2}
if ($0 ~ /Username/){use=$2}
if ($0 ~ /Time/){time=$2};next
}
NF =1 && !/END/ && !/^$/{print...
12,954
Posted By devtakh
your script looks good to me. you can as well use...
your script looks good to me. you can as well use a while loop and minimize the code as below

while [ $Retries -lt 4 ]
do
$Scr_Dir/pingServer | grep UP
if [ $? -eq 0...
1,787
Posted By devtakh
Please paste a sample I/P file content and the...
Please paste a sample I/P file content and the expected O/P.
2,345
Posted By devtakh
I am glad you were able to figure out and its...
I am glad you were able to figure out and its working now :)
46,797
Posted By devtakh
Ok good. try this file=/apps/source.txt ...
Ok good. try this

file=/apps/source.txt
targetfile="final.txt"
while read line;
do
if [ `echo $line | grep -c "IIT *Chennai"` -gt 0 ]; then
var=`echo $line | sed 's/.*<college>\(.*\)...
46,797
Posted By devtakh
Ok. show me the o/p of the below ...
Ok. show me the o/p of the below

file=/apps/source.txt
targetfile="final.txt"
while read line;
do
if [ `echo $line | grep -c "IIT Chennai"` -gt 0 ]; then
var=`echo $line | sed...
Showing results 1 to 25 of 500

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