![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while loop inside while loop | panknil | Shell Programming and Scripting | 0 | 01-07-2008 09:49 AM |
| For loop | xramm | HP-UX | 3 | 10-10-2007 11:20 AM |
| While Loop | hemangjani | Shell Programming and Scripting | 2 | 11-02-2006 08:01 AM |
| for loop | munnabhai1 | Shell Programming and Scripting | 3 | 04-06-2006 11:30 AM |
| how to get the similar function in while loop or for loop | trynew | Shell Programming and Scripting | 3 | 06-17-2002 08:09 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
while , for loop ?
Hi,
I have a text file (.txt) that contains two lines that each have a number on them. ----------------- 5 6 ----------------- I would like to convert those numbers to either another txt file or html file to show asterics instead. ------------------ ***** ****** ------------------ Thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
echo '6' | nawk '{for(i=1; i<=$0; i++) printf("%s%s", "*", (i==$0) ? "\n", "")}'
|
||||
| Google The UNIX and Linux Forums |