Unix Screen command is an indespensable command. Once you know it you cannot live without it. It is window manager. Just try it and you will find it mind blowing.
A new screen can be created using
screen.
Ctrl-A c - Create new window
Ctrl-A A - Name a window
Ctrl-A " - Show all windows.
Ctrl-A S split window.
Ctrl-A tab to move to the next window.
Friday, December 28, 2007
Putty Title
Putty Title can be easily modified using the function wt.
wt ()
{
echo -n "^[]2;${@}^G"
# In all of these, ^[ is really the "escape" character.
# You put it into a file using vi, by typing control-V and then hitting the Escape key.
# Likewise, ^G is the control-G# character. Again, hit control-V
# then hit control-G
}
The link 'http://www.unix.com/unix-dummies-questions-answers/35518-name-path.html'
wt ()
{
echo -n "^[]2;${@}^G"
# In all of these, ^[ is really the "escape" character.
# You put it into a file using vi, by typing control-V and then hitting the Escape key.
# Likewise, ^G is the control-G# character. Again, hit control-V
# then hit control-G
}
The link 'http://www.unix.com/unix-dummies-questions-answers/35518-name-path.html'
Friday, April 06, 2007
Wednesday, January 31, 2007
Word macro to export comments
' This macro will export all the comments in the word doc to a new word doc.
' U can save the word doc as .txt.
' Change the extension to .csv
' Open the doc with excel and u have exported your comments to excel
Sub ExportComment()
Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document
For Each cmt In ActiveDocument.Comments
s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr
Next
Set doc = Documents.Add
doc.Range.Text = s
End Sub
' U can save the word doc as .txt.
' Change the extension to .csv
' Open the doc with excel and u have exported your comments to excel
Sub ExportComment()
Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document
For Each cmt In ActiveDocument.Comments
s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr
Next
Set doc = Documents.Add
doc.Range.Text = s
End Sub
Word macro for requirement table
Need word macro to parse a doc and get all the requirements in one table
Friday, January 05, 2007
MSWORD: Macro to add cross reference
Sub CreateCR()
' CreateCR Macro
' Macro recorded 1/5/2007 by Jay
' This macro converts selection copy to a cross reference - numbered item
Selection.Copy
Dim crossref
crossref = Selection
'MsgBox (crossref)
Dim pNumberedItem
pNumberedItem = ActiveDocument.GetCrossReferenceItems(wdRefTypeNumberedItem) For i = 1 To UBound(pNumberedItem)
'MsgBox (pNumberedItem(i))
If Selection = Trim(pNumberedItem(i)) Then
Selection.InsertCrossReference ReferenceType:="Numbered item", _ ReferenceKind:=wdNumberNoContext, ReferenceItem:= i, _
InsertAsHyperlink:=True, IncludePosition:=False
Exit For
End If
Next i
End Sub
' CreateCR Macro
' Macro recorded 1/5/2007 by Jay
' This macro converts selection copy to a cross reference - numbered item
Selection.Copy
Dim crossref
crossref = Selection
'MsgBox (crossref)
Dim pNumberedItem
pNumberedItem = ActiveDocument.GetCrossReferenceItems(wdRefTypeNumberedItem) For i = 1 To UBound(pNumberedItem)
'MsgBox (pNumberedItem(i))
If Selection = Trim(pNumberedItem(i)) Then
Selection.InsertCrossReference ReferenceType:="Numbered item", _ ReferenceKind:=wdNumberNoContext, ReferenceItem:= i, _
InsertAsHyperlink:=True, IncludePosition:=False
Exit For
End If
Next i
End Sub
Subscribe to:
Posts (Atom)