Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Shahul
1,449
Posted By Shahul
Hi Mohtasims What pamu given is working...
Hi Mohtasims

What pamu given is working fine, however u asked for bash to store in variable....


weblogichome=`ps -ef |cut -d"=" -f2-3|awk '{print $1}'`
javahome=`ps -ef |cut -d"/"...
895
Posted By Shahul
basename <directorywhich has complete path> ...
basename <directorywhich has complete path>

eg:(solaris 9)
$ basename /tmp
tmp
897
Posted By Shahul
$ sort -k1 sort.txt POL B7U6K8 ...
$ sort -k1 sort.txt
POL B7U6K8 Avian_reticuloendotheliosis_virus
POL E6ZGJ1 Dicentrarchus_labrax
POL E6ZGJ4 Dicentrarchus_labrax
POL F4Y5K7 Avian_reticuloendotheliosis_virus...
1,259
Posted By Shahul
Hi teefa, have just tried something and...
Hi teefa,

have just tried something and below are the results...


nawk -F, '{for(x=1;x<100;x++) {if($NF~x) {{x=x".txt"}{print > x}}}}' input.txt
-rw-rw-rw- 1 user user 11 Feb 26...
1,259
Posted By Shahul
if its something which you are aware the limit...
if its something which you are aware the limit then u can try something like this....


nawk '{for(x=1;x<100;x++) {if($NF~x) print > x}}' input.txt


Thanks
Sha
1,596
Posted By Shahul
sed -e 's/\([A-Z].*\)\.\(.*\) \(ADD.*\)/\@...
sed -e 's/\([A-Z].*\)\.\(.*\) \(ADD.*\)/\@ ..\/..\/migschema\/admin\/\2/' -e 's/"//g;s/$/.sql/g' Inputfile.txt
837
Posted By Shahul
Command getting skipped
Hi All,

Its been a long time!!!!!!

Having one problem in our live server....

we have perl code which runs every day for almost 15 to 18hrs process and it creates almost 150 to 200 sub...
1,167
Posted By Shahul
perl FileHandle Closure during after unlock
Hi
we have one function which is used to append data the file in exclusive lock mode in aperl script.
This script is executed by multiple threads at the same time.
accessing the same file.this...
2,255
Posted By Shahul
for solaris please use nawk... :) $ echo...
for solaris please use nawk... :)


$ echo "192.168.2.1.8088" | nawk -F. '{for(i=1;i<NF;i++) printf("%s%s",$i,i==NF-1?"\n":".")}'
192.168.2.1
953
Posted By Shahul
it will be gr8 if you could share what you have...
it will be gr8 if you could share what you have tried in commands :) we can help you to proceed...
1,192
Posted By Shahul
nawk '/2011/ {print $3,$4}' filename ...
nawk '/2011/ {print $3,$4}' filename


Thanks
Sha
1,272
Posted By Shahul
Or :) $ nawk...
Or :)


$ nawk '{gsub(/<parameter>/,"\n<parameter>") && gsub(/<[^>]*>/," ");print}' input.txt|sed -e '/</d' -e '/^$/d'
151515 38
151522 32769
151510 ALCLA0A3F837
151517 1
...
3,194
Posted By Shahul
This should work... sed...
This should work...


sed '/T\([0-9]*\),[A-Z]/ !s/\(.[0-9]*\).*/\1/' inputfile


Thanks
Sha
792
Posted By Shahul
You can try something like this... echo -\n...
You can try something like this...

echo -\n "`raidconfig list raid -v`"



Thanks
SHa
1,737
Posted By Shahul
This will help your requirement :) sort...
This will help your requirement :)


sort input.txt|sed 's/^./& /g'|nawk '{if(NR!=1 && $1 != prev) {ORS="\n";print;prev=$1} else {ORS=":";print;prev=$1}}'|sed 's/ //g'


Thanks
Sha
1,301
Posted By Shahul
df -h|nawk '{gsub(/%/,"");if($5>70)print}' ...
df -h|nawk '{gsub(/%/,"");if($5>70)print}'


Thanks
Sha
1,522
Posted By Shahul
Hi, For running script in remote machine i...
Hi,

For running script in remote machine i suppose by default the file should have permission if you have created script with same user and the place where u are trying to write log file (default...
1,198
Posted By Shahul
for string comparision ...its always good to use...
for string comparision ...its always good to use == :) ....

eg:
v=haiif [ $v == "Netra X4270 X4446A M2" ];then
echo "compare hai"
else
echo "not matching"
fi
not matching
2,017
Posted By Shahul
nawk '/PSOldGen/ {getline;{gsub(/%/,"");print...
nawk '/PSOldGen/ {getline;{gsub(/%/,"");print $4}}' inputfile
97
97
10,424
Posted By Shahul
nawk 'NR==FNR{a[$1]=$1;b[$0]=$0;next}($1 in a)&&...
nawk 'NR==FNR{a[$1]=$1;b[$0]=$0;next}($1 in a)&& !($0 in b)' file1 file2


Thanks
SHa
1,809
Posted By Shahul
This should fix the prob... :) ls...
This should fix the prob... :)


ls filename*|nawk '{a[$0]++} END {for(x in a) print x}' input.txt


sorry Oops this wil not solve ur problem....plz ignore i ll put the correct one..
860
Posted By Shahul
This will help you... nawk -F':' -v...
This will help you...


nawk -F':' -v v1="11:30:00" -v v2="11:40:00" 'OFS=":"{v=$1":"$2":"$3}{if(v>v1 && v<v2)print}' inputfile
11:32:36:124.id_0000.1:"blalba"
11:33:49:124.id_0000.1:"blalba"...
1,514
Posted By Shahul
Using solaris you can try this syntax hope this...
Using solaris you can try this syntax hope this should work...

/usr/xpg4/bin/grep -w -f file1 file2


Thanks
Sha
1,829
Posted By Shahul
nawk '{if(NR==5){system("sed -n '4p' file2")}...
nawk '{if(NR==5){system("sed -n '4p' file2")} else {print}}' file1
29
4,028
Posted By Shahul
$ nawk '{if(NF>10) {print $0"-"NR"\n"$0} else...
$ nawk '{if(NF>10) {print $0"-"NR"\n"$0} else {print $0}}' input.txt|nawk 'NF>11 {$2="EUR"$3;$3="";$NF=""}{print |"sort -n -k3 -r"}'


Thanks
Sha
Showing results 1 to 25 of 235

 

Featured Tech Videos

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