The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Shell Script Unique Identifier Question grahambo2005 UNIX for Dummies Questions & Answers 7 07-22-2008 12:41 PM
Getting is not an identifier error swat Shell Programming and Scripting 12 02-15-2008 05:21 PM
SED or AWK: Appending a line Identifier that changes with paragraph? selkirk UNIX for Dummies Questions & Answers 1 04-28-2007 03:03 AM
Problem with shell script...ORA-00904:invalid identifier bhagat.singh-j Shell Programming and Scripting 12 11-13-2006 10:33 AM
COMMON_ROOT=/files/common: is not an identifier nitinmoriwal UNIX for Advanced & Expert Users 2 08-25-2006 09:38 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-08-2008
script123 script123 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 4
': not a valid identifier

I am trying to write a bash script. I am able to do simple things like pass arguments, assign variables and echo the results. However, when I try to declare and array or anything a little more complicated I get
': not a valid identifier

Here is my code so far:

#!/bin/bash
echo start t
declare -a ARRAY
echo end t

And when I execute the script I get:

start t
': not a valid identifier
end t

My plan is to make a script that reads a file on line at a time and output's only part of each line to another file. It doesn't seem like it should be hard. But I can't get anything to work.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0