Search Results

Search: Posts Made By: devtakh
2,269
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
4,555
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
13,022
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...
5,054
Posted By devtakh
Ok. If the i/p is always the same, then it can be...
Ok. If the i/p is always the same, then it can be automated and better to be automted :)

You may need to change the StartServer.sh script to be able to accept the paramters passed from the outer...
3,480
Posted By devtakh
use while loop filesize=`ls -l output.txt...
use while loop

filesize=`ls -l output.txt |awk '{print $5 }'`
cnt=1
echo $filesize
while [1]
do
filesize_new=`ls -l output.txt |awk '{print $5 }'`
if [ $filesize -ne $filesize_new ]
echo...
3,738
Posted By devtakh
awk -v a="a" -v b="cc" '$2 ~ /c/|| /a/{print}'...
awk -v a="a" -v b="cc" '$2 ~ /c/|| /a/{print}' file


cheers,
Devaraj Takhellambam
4,994
Posted By devtakh
IFS=,; while read str rep; do awk -F "|"...
IFS=,;
while read str rep;
do
awk -F "|" -v str=$str -v rep=$rep '$2 == str {gsub(str,rep,$2);print}' OFS="|" file2 ; done < file3


cheers,
Devaraj Takhellambam
Showing results 1 to 7 of 7

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