tag:blogger.com,1999:blog-3643541476285312391.post6072380081677847275..comments2024-03-25T02:11:41.608-07:00Comments on WebLogic Admin Tricks & Tips: Do you have alias in your profile??Pavan Devarakonda [PD]http://www.blogger.com/profile/06638309611528564002noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3643541476285312391.post-64983974102434080352013-12-18T06:37:11.090-08:002013-12-18T06:37:11.090-08:00Etc, idea is to have letters close to each other,
...Etc, idea is to have letters close to each other,<br />also another hint [deploying my own bashrc on server temp.]:<br /><br />[root@base ~]# cat .bashrc<br /># .bashrc<br /># User specific aliases and functions<br />sss() {<br /> ## Removing http[s] and :port and /url from address<br /> host=$( echo ${*:1} | \<br /> sed "s/\(http\|https\|ftp\)\:\/\///g" | \<br /> sed "s/\(\/\|\:\).*//g" )<br /><br /> ## if .domain is missing, try .homecredit.net<br /> if [[ ! "${host}" =~ .*\..*\. ]];<br /> then<br /> host="$host.homecredit.net"<br /> fi<br /><br /> ssh -o StrictHostKeyChecking=no ${host} "cat > /tmp/.bashrc_temp" < ~/.bashrc_remote<br /> ssh -t ${host} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp"<br />}<br /><br /># ex. $ s server.somewhere.com<br />alias s="sss"<br /><br /># Source global definitions<br />if [ -f /etc/bashrc ]; then<br /> . /etc/bashrc<br />fi<br /><br />### local aliases etc.<br /># .... do your own ;-) <br /><br />---- it will deploy this<br /><br /><br />[root@base ~]# cat .bashrc_remote<br /># .bashrc<br /># this file can be safely removed<br />#<br /># Source global definitions<br />if [ -f /etc/bashrc ]; then<br /> . /etc/bashrc<br />fi<br /><br /><br />### Colors<br />RS="\[\033[0m\]" # reset<br />FBLK="\[\033[30m\]" # foreground black<br />FRED="\[\033[31m\]" # foreground red<br />FGRN="\[\033[32m\]" # foreground green<br />FYEL="\[\033[33m\]" # foreground yellow<br />FBLE="\[\033[34m\]" # foreground blue<br />FMAG="\[\033[35m\]" # foreground magenta<br />FCYN="\[\033[36m\]" # foreground cyan<br />FWHT="\[\033[37m\]" # foreground white<br /><br /><br />## Variables<br />tec_user_host="$FYEL\u@\h$RS"<br />tec_serv_type=$(uname -n |cut -d'.' -f2)<br />tec_serv_path="$FGRN\W$RS"<br /><br /><br />## Customization<br />case ${tec_serv_type} in<br /> 'prod') tec_serv_type="[$FRED${tec_serv_type}$RS]" ;;<br /> 'dev') tec_serv_type="[$FGRN${tec_serv_type}$RS]" ;;<br /> *) tec_serv_type="[--]" ;;<br />esac<br /><br />#\[\033[0m\]<br />## Important things<br /># - date because of different timezones in different countries<br />export PS1="[$tec_user_host $tec_serv_type $FWHT$(date +%d/%m/%k:%M)$RS $tec_serv_path]\$ "<br /><br /># one touch show<br />alias u="uname -a"<br />alias i="ip -o a s |grep inet |awk '{print \$2,\$4}' |grep -v ^lo |sed 's/\// \//g'"<br />alias p="ps fauxwww"<br />alias pp="ps fauxwww |less"<br />alias pg="ps fauxwww |grep"<br />Tecquilkahttps://www.blogger.com/profile/18372055239399523312noreply@blogger.comtag:blogger.com,1999:blog-3643541476285312391.post-24350185954347990212013-12-18T06:31:16.472-08:002013-12-18T06:31:16.472-08:00alias u="uname -a"
alias i="ip ...alias u="uname -a"<br />alias i="ip -o a s |grep inet |awk '{print \$2,\$4}' |grep -v ^lo |sed 's/\// \//g'"<br />alias p="ps fauxwww"<br />alias pp="ps fauxwww |less"<br />alias pg="ps fauxwww |grep"<br />Tecquilkahttps://www.blogger.com/profile/18372055239399523312noreply@blogger.comtag:blogger.com,1999:blog-3643541476285312391.post-39117864497789122892010-08-25T07:25:45.411-07:002010-08-25T07:25:45.411-07:00Great idea!!! This can reduce our time by not typ...Great idea!!! This can reduce our time by not typing long same commands 100 times a day.<br /><br />ShahbazUnknownhttps://www.blogger.com/profile/12607875086737188583noreply@blogger.com