![]() |
|
|
|
|
|||||||
| 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 |
| Sed , Replace a "variable text" inside of a statement | jackn7 | Shell Programming and Scripting | 4 | 03-04-2008 11:40 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 09:52 PM |
| error "Invalid argument" returned after call sched_setscheduler | robin.zhu | High Level Programming | 1 | 07-26-2007 12:51 AM |
| Returning a "0" if folder is empty | Raynon | Shell Programming and Scripting | 12 | 06-01-2007 02:59 AM |
| "test: argument expected" error | mvalonso | UNIX for Dummies Questions & Answers | 6 | 02-09-2005 10:07 AM |
|
|
LinkBack | Thread Tools | 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 "${*}"
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 |
| Forum Sponsor | ||
|
|
|
|||
|
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 12:40 PM. |
|||
| Google UNIX.COM |