![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Concatenation | Asteroid | Shell Programming and Scripting | 11 | 04-04-2007 03:15 AM |
| File Concatenation | samit_9999 | UNIX for Dummies Questions & Answers | 3 | 11-21-2006 02:26 AM |
| string concatenation | systemsb | UNIX for Dummies Questions & Answers | 7 | 04-04-2006 09:03 AM |
| Implementing Concatenation(cat) | toughguy2handle | High Level Programming | 2 | 09-21-2005 11:10 PM |
| Concatenation | videsh77 | Shell Programming and Scripting | 2 | 12-14-2004 02:13 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
cannot get logic for concatenation awk
Hello friends,
I have a problem in printing an array.. Example if my array line contains 4 elements like following line[1]=0002 , line[2]=202200, line[3]=200002, line[4]= 300313 Now Code:
one = sprintf line[1] line[2] line[3] line[4] But I am not sure about the array index how long will it will be ..If more big array came I need to write it again like Code:
one = sprintf line[1] line[2] line[3] line[4] line[5] ..... Thanks in advance.. |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
but my problem is to print it in one variable suppose if my number of elements in the array is 3 ,then my commnad should look like this Code:
input = sprint line[1] line[2] line[3] Code:
input = sprint line[1] line[2] line[3] line[4] That is my basic need .. pls help.. |
|
|||
|
Quote:
Code:
input = ""
for (i=1 ; i < j ; i ++){
input = sprint input "" line[i]
}
|
|
|||
|
Quote:
what is sprint? input = input "" line[i] should suffice. |
|||
| Google UNIX.COM |