![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while loop inside while loop | panknil | Shell Programming and Scripting | 0 | 01-07-2008 12:49 PM |
| For loop | xramm | HP-UX | 3 | 10-10-2007 02:20 PM |
| For Loop help | princssashes | UNIX for Dummies Questions & Answers | 2 | 11-09-2006 05:37 AM |
| While Loop | hemangjani | Shell Programming and Scripting | 2 | 11-02-2006 11:01 AM |
| how to get the similar function in while loop or for loop | trynew | Shell Programming and Scripting | 3 | 06-17-2002 11:09 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
all the best
hi
i m not sure. i will post actual code tommarow. First - read a file into vaiable like read var < cat filename [ test] Next start a for loop by using number of lines in a file [ test] for icnt -eq lcount rof u can get number of lines lcount as -- wc filename then use a flg -- a print a line all the best Regards, Swapneel i m just giving you logic. as i think this is a Homework. and u can not post home work on this foroum. so try your best. all the best |
|
|||||
|
Please read our rules which state:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly. and (6) Do not post classroom or homework problems. If you want lines 1,5,9,13... which is not exactly every third line, you can use sed: yes|nl|sed 'p;N;N;N;d' It's not a for loop, but it's a good solution if this isn't homework. ![]() |
|
||||
|
hi. sed command works perfect. here are some links which would be really helpful for sed command can't give you the answer.
http://www.computerhope.com/unix/used.htm |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|