|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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 | Display Modes |
|
#1
|
|||
|
|||
|
Put output into an array
I'm trying to take the output of an environment that has multiple strings ex. Code:
# echo $SSH_CLIENT 192.168.1.1 57039 22 I need that IP... so I can set it to another environment. Thank you |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
Code:
IP=${SSH_CLIENT%% *} |
|
#3
|
|||
|
|||
|
Thank you Franklin52.
Is there any way I could have a break down on why that works so I may better understand it? |
|
#4
|
|||
|
|||
|
Quote:
Learning the Korn Shell, 2nd Edition: Chapter 4: Basic Shell Programming Regards |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C system() how to send the output to an array?? | Jess83 | Programming | 5 | 01-20-2010 03:50 AM |
| Creating an Array in KSH from output (stdout) | carlos25 | Shell Programming and Scripting | 2 | 09-25-2008 12:45 AM |
| bash:awk output into an array | phamp008 | Shell Programming and Scripting | 2 | 03-16-2008 04:14 AM |
| move output of awk to array | amitrajvarma | Shell Programming and Scripting | 14 | 12-21-2007 05:12 AM |
| output of an array | ragha81 | Shell Programming and Scripting | 3 | 03-22-2007 03:30 PM |