![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
I got the following output: Code:
This is the name of the game This is the name of the game that is the output printed twice instead of once. Also, the output was printed with an interval of 1 sec between words and not each character/letter. |
|
|||
|
Quote:
For character by character, try: Code:
echo "This is the name of the game"|awk '{ ORS="";while(i++<length($0)) { print substr($0,i,1); system("sleep 1"); } }'
|
|
|||
|
Quote:
Code:
echo "This is the name of the game"|awk '{ ORS="";while(i++<length($0)) { print substr($0,i,1); system("sleep 1"); }printf "\n"; }'
|
| Bits Awarded / Charged to dennis.jacob for this Post | |||
| Date | User | Comment | Amount |
| 11-26-2009 | Anonymous | good | 100 |
|
|||
|
While i run the above code snippet ctrl+c doesn't have any effect. Why is it so?
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| printing portion of the output usind sed/awk | unahb1 | Shell Programming and Scripting | 4 | 10-01-2009 12:45 PM |
| compare the interval of 2 numbers of input2with interval of several numbers of input1 | repinementer | Shell Programming and Scripting | 1 | 07-21-2009 10:52 PM |
| output the letters of the alphabet with the number of occurrences | svd | High Level Programming | 10 | 12-03-2007 10:19 AM |
| printing output more than 13 | Krrishv | Shell Programming and Scripting | 2 | 01-22-2007 05:35 AM |
| Printing output to the monitor | jyotipg | Shell Programming and Scripting | 2 | 06-22-2004 06:41 AM |