Text type convert
Convert a text file format from MSDOS to UNIX
dos2unix input_file output_file
Convert a text file format from MSDOS to UNIX
dos2unix input_file output_file
This command removes all the even lines from the file given as the argument
cat example.txt|awk 'NR%2==1'
The command cmp is similar to diff:
# cmp file1 file2
file1 file2 differ: byte 10, line 1
Some Google Reader Shortcuts
| j/k | item down/up | selects the next/previous item in the list |
| s | toggle star | stars the selected item |
| shift-s | toggle share | shares the selected item |
| m | mark as read/unread | switches the read status of the selected item |
| v | view original | opens the original source for this article in a new window |
| shift-a | mark all as read | marks all items in the current view as read |
| 1 | expanded view | displays the subscription as expanded items |
| 2 | list view | displays the subscription as a list of headlines |
| r | refresh | refreshes the unread counts in the navigation |
| gh | go to home | goes to the Google Reader homepage |
| ga | go to all items | goes to the “All items” view |
| gs | go to starred items | goes to the “Starred items” view |
| u | toggle full screen mode | hides or shows the list of subscriptions |
| ? | keyboard shortcuts help | displays a quick guide to all of Reader’s shortcuts |
This is how to create hard and soft links in Linux. Remember, a directory cannot be hard linked.
#Hard link
ln /path/to/file.ext .
#Soft link
ln -s /path/to/file.ext .
[tags]link, shortcut, soft,hard,linux,command[/tags]
Convent video using mencoder in linux…
mencoder input.mpg -o output.avi -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc
http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html
http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide
[tags]video,convert,mencoder,encode,format[/tags]
The search that limits the results to just directory listings…
intitle:”index.of” inanchor:”Last Modified” inanchor:”Description” inanchor:”Parent Directory” -filetype:php -filetype:asp -filetype:htm -filetype:html -inurl:”index.of” search.string
[tags]google,search,directory,listing,apache,folder,power[/tags]
One can use awk to get a specific column from a command output…
First column of the command
date|awk '{print $1}'
11th Column of the command
ps aux|awk '{print $11}'
Use a different Field separator
cat /etc/passwd|awk -F ':' '{print $1}'
[tags]awk,sed,shell,script,output,filter,text,cli,linux,string,separator[/tags]
Disabling startup login prompt for password
[tags]windows,xp,password,user,boot,startup,prompt[/tags]
Omit unnecessary words. Make every sentence contribute to the point you want to make. Use paragraphs as your arguments. Go through a piece and ask, is this word/clause/sentence/paragraph really necessary? Does it add to the reader’s understanding of the topic, or is it just wind? And once you’ve taken out any fluff, go over it again and ask, do my paragraphs flow clearly from one to the next? Do my arguments build logically on each other?
Avoid passive voice. Whenever possible, rewrite sentences to make them active. You can usually rewrite sentences that begin with “There is” or “There are” to make them more active.
Avoid future tense.
Avoid cliches and overused phrases such as “That’s where ProductX comes in,” “Enter ProductX,” and “last but not least.”
Spell out all abbreviations on first reference: “Open Source Technology Group (OSTG)”
Spell out words on first reference: say “application” before you refer to “apps.”
Spell out numerals less than 10, unless they refer to amounts with units. Use numerals for numbers greater than nine.
[tags]english,writing,article,rules,blogging[/tags]