<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4209271622693273275</id><updated>2011-07-08T00:53:07.639-07:00</updated><category term='shell script'/><title type='text'>his name is joe ...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jaw8186.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jaw8186.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>joe is my nick name</name><uri>http://www.blogger.com/profile/03198891815417530149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_De4_ZRU33Rg/SqYWgB437bI/AAAAAAAAAAM/cPZwe2o68tk/S220/DSC01543.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4209271622693273275.post-5501268360827921627</id><published>2009-09-10T04:05:00.000-07:00</published><updated>2009-09-10T04:14:57.974-07:00</updated><title type='text'>vi command</title><content type='html'>General Startup To use vi: vi filename To exit vi and save changes: ZZ or :wq To exit vi without saving changes: :q! To enter vi command mode: [esc]&lt;br /&gt;Counts A number preceding any vi command tells vi to repeat that command that many times.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cursor Movement&lt;br /&gt;&lt;/strong&gt;h move left (backspace)&lt;br /&gt;j move down&lt;br /&gt;k move up&lt;br /&gt;l move right (spacebar)&lt;br /&gt;[return] move to the beginning of the next line&lt;br /&gt;$ last column on the current line&lt;br /&gt;0 move cursor to the first column on the current line&lt;br /&gt;^ move cursor to first nonblank column on the current line&lt;br /&gt;w move to the beginning of the next word or punctuation mark&lt;br /&gt;W move past the next space&lt;br /&gt;b move to the beginning of the previous word or punctuation mark&lt;br /&gt;B move to the beginning of the previous word, ignores punctuation&lt;br /&gt;e end of next word or punctuation mark&lt;br /&gt;E end of next word, ignoring punctuation&lt;br /&gt;H move cursor to the top of the screen&lt;br /&gt;M move cursor to the middle of the screen&lt;br /&gt;L move cursor to the bottom of the screen&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Screen Movement&lt;/strong&gt;&lt;br /&gt;G move to the last line in the file&lt;br /&gt;xG move to line x&lt;br /&gt;z+ move current line to top of screen&lt;br /&gt;z move current line to the middle of screen&lt;br /&gt;z- move current line to the bottom of screen&lt;br /&gt;^F move forward one screen&lt;br /&gt;^B move backward one line&lt;br /&gt;^D move forward one half screen&lt;br /&gt;^U move backward one half screen&lt;br /&gt;^R redraw screen ( does not work with VT100 type terminals )&lt;br /&gt;^L redraw screen ( does not work with Televideo terminals )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Inserting&lt;/strong&gt;&lt;br /&gt;r replace character under cursor with next character typed&lt;br /&gt;R keep replacing character until [esc] is hit&lt;br /&gt;i insert before cursor&lt;br /&gt;a append after cursor&lt;br /&gt;A append at end of line&lt;br /&gt;O open line above cursor and enter append mode&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Deleting&lt;/strong&gt;&lt;br /&gt;x delete character under cursor&lt;br /&gt;dd delete line under cursor&lt;br /&gt;dw delete word under cursor&lt;br /&gt;db delete word before cursor&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Copying Code&lt;br /&gt;&lt;/strong&gt;yy (yank)'copies' line which may then be put by the p(put) command. Precede with a count for multiple lines.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Put Command&lt;/strong&gt;&lt;br /&gt;brings back previous deletion or yank of lines, words, or characters&lt;br /&gt;P bring back before cursor&lt;br /&gt;p bring back after cursor&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Find Commands&lt;/strong&gt;&lt;br /&gt;? finds a word going backwards&lt;br /&gt;/ finds a word going forwards&lt;br /&gt;f finds a character on the line under the cursor going forward&lt;br /&gt;F finds a character on the line under the cursor going backwards&lt;br /&gt;t find a character on the current line going forward and stop one character before it&lt;br /&gt;T find a character on the current line going backward and stop one character before it&lt;br /&gt;; repeat last f, F, t, T&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Miscellaneous Commands&lt;/strong&gt;&lt;br /&gt;. repeat last command&lt;br /&gt;u undoes last command issued&lt;br /&gt;U undoes all commands on one line&lt;br /&gt;xp deletes first character and inserts after second (swap)&lt;br /&gt;J join current line with the next line&lt;br /&gt;^G display current line number&lt;br /&gt;% if at one parenthesis, will jump to its mate&lt;br /&gt;mx mark current line with character x&lt;br /&gt;'x find line marked with character x&lt;br /&gt;NOTE: Marks are internal and not written to the file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Line Editor Mode&lt;/strong&gt;&lt;br /&gt;Any commands form the line editor ex can be issued upon entering line mode.&lt;br /&gt;To enter: type ':'&lt;br /&gt;To exit: press[return] or [esc]&lt;br /&gt;&lt;br /&gt;ex Commands For a complete list consult the UNIX Programmer's Manual&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;READING FILES &lt;/strong&gt;&lt;br /&gt;copies (reads) filename after cursor in file currently editing&lt;br /&gt;:r filename&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WRITE FILE&lt;/strong&gt;&lt;br /&gt;:w saves the current file without quitting&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MOVING&lt;br /&gt;&lt;/strong&gt;:# move to line #&lt;br /&gt;:$ move to last line of file&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SHELL ESCAPE &lt;/strong&gt;executes 'cmd' as a shell command.&lt;br /&gt;:! 'cmd'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4209271622693273275-5501268360827921627?l=jaw8186.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jaw8186.blogspot.com/feeds/5501268360827921627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jaw8186.blogspot.com/2009/09/general-startup-to-use-vi-vi-filename.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/5501268360827921627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/5501268360827921627'/><link rel='alternate' type='text/html' href='http://jaw8186.blogspot.com/2009/09/general-startup-to-use-vi-vi-filename.html' title='vi command'/><author><name>joe is my nick name</name><uri>http://www.blogger.com/profile/03198891815417530149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_De4_ZRU33Rg/SqYWgB437bI/AAAAAAAAAAM/cPZwe2o68tk/S220/DSC01543.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209271622693273275.post-4714719789464897304</id><published>2009-09-08T04:16:00.000-07:00</published><updated>2009-09-08T04:26:05.146-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>how to use awk | substr</title><content type='html'>hi all,&lt;br /&gt;&lt;br /&gt;herewith i have a flat file (test.txt) below :&lt;br /&gt;&lt;br /&gt;test.txt :&lt;br /&gt;&lt;br /&gt;CTI-ProgramStart|VVV2|Program Start|VKGXXXXXXXX|VKGXXXXXX|06/01/22 00:33:49.467|WSSACCCXXXX|VVV21137XXX3|B Program Version:.6.4.5 AgentID:2247 Password: Signature: Extention:&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;7950&lt;/span&gt; PeripheralID:2 SideAHost:109.XX.XX.XX SideBHost:192.XX.XX.XX SideAPort:42027 SideBPort:5874 HEARTBEATINTERVAL:-1 EXPECTEDCLIENTS:150 QUEUESIZE:32 POOLSIZE=64 SERVICESMASK:-214749088 EVENTSMASK:311071 STATUSMASK:1031 TRACEMASK:5|&lt;br /&gt;&lt;br /&gt;i would like to get ext = 7950&lt;br /&gt;&lt;br /&gt;BEGIN {&lt;br /&gt;FS="[|]"&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$1 == "CTI-ProgramStart" {&lt;br /&gt; if( match($9, /Extention:[0-9][0-9]*/) ) {&lt;br /&gt;   str=substr($9, RSTART, RLENGTH)&lt;br /&gt;   ext=substr(str, index(str, ":")+1)&lt;br /&gt;   print ext&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note : u have to read the flat file fisrt before insert the algorithm.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4209271622693273275-4714719789464897304?l=jaw8186.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jaw8186.blogspot.com/feeds/4714719789464897304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jaw8186.blogspot.com/2009/09/how-to-use-awk-substr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/4714719789464897304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/4714719789464897304'/><link rel='alternate' type='text/html' href='http://jaw8186.blogspot.com/2009/09/how-to-use-awk-substr.html' title='how to use awk | substr'/><author><name>joe is my nick name</name><uri>http://www.blogger.com/profile/03198891815417530149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_De4_ZRU33Rg/SqYWgB437bI/AAAAAAAAAAM/cPZwe2o68tk/S220/DSC01543.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209271622693273275.post-4144010959924446408</id><published>2009-09-08T01:42:00.000-07:00</published><updated>2009-09-08T04:27:33.348-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>how to display date yesterday at unix</title><content type='html'>if u want to display date yesterday at unix with format &lt;span style="font-weight: bold;"&gt;YYYYMMDD&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;you can try with my script below :&lt;br /&gt;&lt;br /&gt;if u type at unix shell with syntac date, so the result is below :&lt;br /&gt;bash-3.2$ date&lt;br /&gt;Tue Aug 18 08:41:44 wib 2009&lt;br /&gt;&lt;br /&gt;we can change the format as our need. example i need format &lt;span style="font-weight: bold;"&gt;yyyymmdd&lt;/span&gt;.&lt;br /&gt;please make script below and save to &lt;span style="font-weight: bold;"&gt;tanggal_hari_ini.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;run as below&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sh tanggal_hari_ini.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Input Script :&lt;br /&gt;&lt;br /&gt;#!/usr/bin/bash&lt;br /&gt;# bof date&lt;br /&gt;month=`date +%m`&lt;br /&gt;day=`date +%d`&lt;br /&gt;year=`date +%Y`&lt;br /&gt;month=`expr $month + 0`&lt;br /&gt;day=`expr $day - 1`&lt;br /&gt;if [ $day -eq 0 ]; then&lt;br /&gt;month=`expr $month - 1`&lt;br /&gt;if [ $month -eq 0 ]; then&lt;br /&gt;month=12&lt;br /&gt;day=31&lt;br /&gt;year=`expr $year - 1`&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;case $month in&lt;br /&gt;1|3|5|7|8|10|12) day=31;;&lt;br /&gt;4|6|9|11) day=30;;&lt;br /&gt;2)&lt;br /&gt;if [ `expr $year % 4` -eq 0 ]; then&lt;br /&gt;if [ `expr $year % 400` -eq 0 ]; then&lt;br /&gt;  day=29&lt;br /&gt;elif [ `expr $year % 100` -eq 0 ]; then&lt;br /&gt;  day=28&lt;br /&gt;  else&lt;br /&gt;   day=29&lt;br /&gt;fi&lt;br /&gt; else&lt;br /&gt;   day=28&lt;br /&gt;fi&lt;br /&gt; ;;&lt;br /&gt;esac&lt;br /&gt;fi&lt;br /&gt;fi&lt;br /&gt;case $month in&lt;br /&gt;[0-9]) month="0$month";;&lt;br /&gt;esac&lt;br /&gt;case $day in&lt;br /&gt;[0-9]) day="0$day";;&lt;br /&gt;esac&lt;br /&gt;yesterday=$year$month$day&lt;br /&gt;echo $yesterday&lt;br /&gt;# eof date&lt;br /&gt;exit 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;output script : 20090818&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4209271622693273275-4144010959924446408?l=jaw8186.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jaw8186.blogspot.com/feeds/4144010959924446408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jaw8186.blogspot.com/2009/09/cara-menampilkan-tanggal-kemarin-di.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/4144010959924446408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/4144010959924446408'/><link rel='alternate' type='text/html' href='http://jaw8186.blogspot.com/2009/09/cara-menampilkan-tanggal-kemarin-di.html' title='how to display date yesterday at unix'/><author><name>joe is my nick name</name><uri>http://www.blogger.com/profile/03198891815417530149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_De4_ZRU33Rg/SqYWgB437bI/AAAAAAAAAAM/cPZwe2o68tk/S220/DSC01543.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209271622693273275.post-3913508445219251318</id><published>2009-09-07T20:16:00.000-07:00</published><updated>2009-09-08T04:26:15.690-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>swap columns and replace</title><content type='html'>hi, any problem manipulating (swap coloumn n replace)&lt;br /&gt;example :&lt;br /&gt;&lt;br /&gt;File sebelum.txt&lt;br /&gt;&lt;br /&gt;1A6Y173BPHE-75.1167.5&lt;br /&gt;1A6Y174BGLY58.7155.7&lt;br /&gt;1A6Y175BARG-18.1142.6&lt;br /&gt;1A6Y176BILE-72.6136.1&lt;br /&gt;1A6Y177BPRO-68.1-136.2&lt;br /&gt;1A6Y178BLYS-162.6360.0&lt;br /&gt;&lt;br /&gt;sould be :&lt;br /&gt;&lt;br /&gt;File sesudah.txt&lt;br /&gt;&lt;br /&gt;1A6YB173PHE-75.1167.5&lt;br /&gt;1A6YB174GLY58.7155.7&lt;br /&gt;1A6YB175ARG-18.1142.6&lt;br /&gt;1A6YB176ILE-72.6136.1&lt;br /&gt;1A6YB177PRO-68.1-136.2&lt;br /&gt;1A6YB178LYS-162.6360.0&lt;br /&gt;&lt;br /&gt;you can do it with this script&lt;br /&gt;&lt;br /&gt;cat sebelum.txt awk 'BEGIN { FS=""; OFS="" } {$a=$2 $2=$3; $3=$a; print $0 } ' &gt;&gt; sesudah.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note :&lt;br /&gt;&lt;br /&gt;FS = Field Sparator&lt;br /&gt;OFS = Output Field Sparator&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4209271622693273275-3913508445219251318?l=jaw8186.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jaw8186.blogspot.com/feeds/3913508445219251318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jaw8186.blogspot.com/2009/09/swap-columns-and-replace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/3913508445219251318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209271622693273275/posts/default/3913508445219251318'/><link rel='alternate' type='text/html' href='http://jaw8186.blogspot.com/2009/09/swap-columns-and-replace.html' title='swap columns and replace'/><author><name>joe is my nick name</name><uri>http://www.blogger.com/profile/03198891815417530149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_De4_ZRU33Rg/SqYWgB437bI/AAAAAAAAAAM/cPZwe2o68tk/S220/DSC01543.JPG'/></author><thr:total>0</thr:total></entry></feed>
