![]() |
|
|
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 |
| Enable a shell to collect data from unix, return to windows | rossalyn_maxter | UNIX for Dummies Questions & Answers | 1 | 12-19-2007 01:55 AM |
| ccall database and collect data from one table | rinku | Shell Programming and Scripting | 0 | 05-28-2007 02:16 AM |
| Using loop reading a file,retrieving data from data base. | Sonu4lov | Shell Programming and Scripting | 1 | 01-19-2007 03:38 AM |
| Best way to collect bounces | kevin9 | UNIX for Dummies Questions & Answers | 2 | 10-05-2005 04:13 PM |
| collect-process | arn_ch | UNIX for Dummies Questions & Answers | 1 | 03-29-2001 01:02 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
collect data from another file
Hi Friends ,
I am urgently needed your help. could you pleas help me in creating the shell script. Requirement : collect the data from no_file.txt no_file.txt ============ 1 11 265 290 300 313 326 351 Then create another shele script like my_shell.csh =========== head -11 M2_Sales_N01.txt |tail -10 >M2_Sales_N01_01.txt head -265 M2_Sales_N01.txt |tail -254>M2_Sales_N01_02.txt head -290 M2_Sales_N01.txt |tail -25 >M2_Sales_N01_03.txt head -300 M2_Sales_N01.txt |tail -10 >M2_Sales_N01_04.txt head -313 M2_Sales_N01.txt |tail -13 >M2_Sales_N01_05.txt head -326 M2_Sales_N01.txt |tail -13 >M2_Sales_N01_06.txt head -351 M2_Sales_N01.txt |tail -25 >M2_Sales_N01_07.txt .... .... Logic ===== fetch the first two digit (1,11) then last-first, 11-1 =10 head -11 M2_Sales_N01.txt |tail -10 >M2_Sales_N01_01.txt fetch next two nos (265,11) .Then 265-11=254 head -265 M2_Sales_N01.txt |tail -254>M2_Sales_N01_02.txt Thanks In advance. Bikas |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|