One Day One Cmd

Place for playing with commands…

Monthly Archives: July 2010

Day 17: $ sort

ODOC: $sort foo.txt.The sort cmd reads lines of text & prints them in sorted order.i.e dictionary format.The -n option sorts numerically.:-)

Advertisements

Day 16: $ tail

echo “ODOC:$tail foo.txt. It will print the last 10 lines from the input file.we can get more lines by using option –n. eg:$tail -n 40 foo.txt. It will print last 40 lines from the input file 🙂

Day15: $head

ODOC: $head foo.txt.It prints the top of its input & discards the rest.Defaults it will print top 10 lines.To print the first 20 lines of a text file $head -n 20 foo.txt.:-)

Day14: $fmt

ODOC:$ fmt -u foo.txt.This fmt cmd will convert text of foo.txt into uniform spacing & display it.$ fmt -w 70 foo.txt will set the max line width to 70 chars.:-)

The world will come forward to help us when we start providing service to this world

Friends,

I didnt send 1day1cmd for past 3 days due to mobile problem. And i didnt update in blog about few days cmds. Its tough to type in blog as well as in mobile.

But now very happy.

Mr.X from ilugc, donated Huawei E1550 idea NetSetter sms dongle to send 1day1cmd (to Kanchi Lug). [He requested me to, pl dont mention his name ]

http://bit.ly/d3QYAu http://bit.ly/c1irel

He voluntarily asked me ,’ how you are sending sms throughout the India?’

I replied, ‘from mobile only i am sending sms to all’.

He came forward and ordered the sms dongle before 2 weeks. 🙂

And now i have that device in my hand. 🙂

Using gnokii and gammu & Ruby/Python script i am sending ODOC to 225 people through the nation without any trouble from today (21.07.2010).

Happy.

I would like to say thanks to Mr.Thyagarajan Shanmugham from ilugc those who gave his mobile (nokia 6600) to kanchilug initially while starting this service.

Very thanks to Mr.X.

🙂 The world will come forward to help us when we start providing service to this world. 🙂

yes. I got it . Thanks 🙂

Regards,
Arulalan.T

Day13: $ expand

ODOC:$expand -t 3 foo.txt.The expand cmd is used to replace tabs with spaces in files.Tab size can be set with -t no.Default tab size is 8.

eg:$expand -t 3 foo.txt.This ll change all tabs in foo.txt to 3 spaces,display it on d screen.imp:It doesnt affect foo.txt.It just change the tab size & display it on d screen.

To save d tab size changes of one input file to another file,use > symbol.eg:$expand -t 3 foo.txt > foo_new.txt.:-)

Got SMS Device

Hi.One good news! we got Huawei E1550 idea NetSetter sms dongle to send 1day1cmd. Mr.Raja Subramaniyan from chennai Lug is donated this to our service.
From today you will receive 1day1cmd successfully without fail :-).

Day 12 : $ date

ODOC: $ date . This date cmd will return current day,month,date,time,year. Wed JUl 7 10:13:26 IST 2010.
we can give many format option with date cmd from %a to %z and %A to %Z. For eg % date +%D, will return 07/07/10 only.

$date +%r will return 10:13:26 IST. $ date +%z will return our time zone in GMT format. +0530 hours. IST means Indian Standard Time.

This date cmd will be mainly used while we automate one prog to execute on particular date & time.
For more info use $ man date. 🙂

Day 11 : $ wc

ODOC: $ wc input_file. Using this word count cmd, we can get the no of lines,words,character which will containing inside the input file.
It will return the no of charcters of the input text file. The input file may be .txt, .pdf, .odt, .doc, etc.,

eg: $ wc demo.pdf. It will return like 58 lines , 276 words, 1000 characters is contained by demo.pdf. 🙂
If u will do like $ wc demo.pdf demo1.txt means, it will return no of lines, words & chars . Its nothing but doing addition of demo.pdf+demo1.pdf
and will return the combined result of no of lines, words, and characters. 🙂

Day 10 : $ touch – timestamp

ODOC : In linux we can see file/foder access,modification date & time in its properties. Using "touch" cmd we can modify/update its time
of access/modify date&time.

i.e. whenever we creating one file, the timestamp also created along with it. It will update whenever we access,modify it.
eg: $ touch a.txt. See its properties to view access,modify time.

Now $ touch -t 198708291759 a.txt

Now you can see, the access,modify time is changed from today date,time into 1987yr aug month 29th 5.59pm.

If you again do $ touch a.txt means, the access,modify time & date will be updated with current date & time. 🙂