![]() |
|
|
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 |
| Sed variable substitution when variable constructed of a directory path | alrinno | Shell Programming and Scripting | 2 | 07-11-2008 03:24 PM |
| Declaring Global Variables in KLD | int80h | BSD | 1 | 01-21-2008 09:11 AM |
| Declaring functions in CSH | tipsy | Shell Programming and Scripting | 4 | 01-22-2007 04:54 PM |
| Declaring Local Arrays | ksh | Shell Programming and Scripting | 1 | 02-22-2005 09:16 AM |
| Declaring variable environments in .cshrc | v_sharda | UNIX for Dummies Questions & Answers | 2 | 09-23-2002 11:25 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
declaring variable with for $(seq)
Hi guys. i have the following script: Code:
1 #!/bin/bash 2 linkcount=$(grep "/portal" tickets | wc -l) 3 grep "/portal" tickets > links 4 for i in $(seq 1 $linkcount); do 5 echo "BLYAT" 6 let link$i=$(sed -n "$i"p links) 7 echo $[link$i] 8 done the problem is, that "let" can`t define the variable, as variable looks like "/portal/ticket/show/090107-01666?status=open". as you can see script should define a number of line(1-x) variables and echo them Could you please suggest some options? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|