![]() |
|
|
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 |
| "test: argument expected" error | mvalonso | UNIX for Dummies Questions & Answers | 7 | 10-17-2008 12:16 PM |
| Sed , Replace a "variable text" inside of a statement | jackn7 | Shell Programming and Scripting | 4 | 03-04-2008 03:40 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| error "Invalid argument" returned after call sched_setscheduler | robin.zhu | High Level Programming | 1 | 07-26-2007 04:51 AM |
| Returning a "0" if folder is empty | Raynon | Shell Programming and Scripting | 12 | 06-01-2007 06:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I'm trying to build a korn shell script which will check some information located at a column of one .csv archive. The problem I'm having is that my script is not having the correct response: Code:
#!/bin/ksh
i = 1
echo "Printing 1"
echo "${1}"
echo "Printing #"
echo "${#i}"
echo "Printing @"
echo "${@}"
echo "Printing *"
echo "${*}"
Running: script.ksh a b c The response: ksh[3]: i: not found Printing 1 dev Printing # 0 Printing @ dev Printing * dev "dev" I believe that it's regarding the environment I'm working on, but it was supposed to retrieve: Printing 1 a Printing # 3 Printing @ a Printing * abc Thanks for anyone who helps. Best regards, Felipe |
|
||||
|
Guys, The problem is kind of solved, I've got the info that I needed to run "chmod -x <script_name>" in order to the whole thing happen, so the script could be really executed.
There are still a few flaws I need to amend. I'm trying to search some way to access arguments variables as arrays, obtaining the $1 or $5 as something like array[1]. Thanks in advance for any help that might come. Cheers! Last edited by felipebb; 06-09-2008 at 04:40 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|