Search Results

Search: Posts Made By: devtakh
3,347
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,683
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...
4,077
Posted By devtakh
awk 'NF && NF>1{print; exit}'...
awk 'NF && NF>1{print; exit}' ASCENTRIC_TRADE_2.txt


cheers,
Devaraj Takhellambam
2,416
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]}}' ...
5,504
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
3,159
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,786
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
8,208
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...
30,289
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,638
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...
3,045
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...
5,342
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,729
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...
5,006
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
5,006
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
5,006
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
63,748
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,
^...
63,748
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/'
63,748
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,435
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...
13,310
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...
2,271
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,889
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 :)
63,748
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>\(.*\)...
63,748
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 08:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy