LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 06-08-2006, 08:20 AM   #1
linux_newbee
LQ Newbie
 
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11

Rep: Reputation: 0
Exclamation Unix script : Append to a file


I am trying to write a Unix script which does the following:

Append the
Code:

alias myserver='/usr/bin/myserver :$SOME_USERID -name $SOME_USERNAME'

to the end of a particular file.

Can anyone help me with doing this ?

I tried the following in my script file
Code:

echo "alias myserver='/usr/bin/myserver :$SOME_USERID -name $SOME_USERNAME'" >> .bashrc


But i am getting the following
invalid command name "echo"
while executing
"echo "alias

1. Why is this happening ?
2. Any other way to do the appending ?

Thanks in advance
 
Old 06-08-2006, 08:41 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Don't post in muliple forums; it's against the rules.
 
Old 06-08-2006, 01:12 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...d.php?t=452806
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run bat file from Unix script??? gopi_20us Programming 10 09-14-2010 09:15 AM
unix shell script:How to delete the first line in a file?? rche3252 Programming 6 03-03-2010 07:32 AM
Unix scrpting : Append to a file linux_newbee Programming 6 06-12-2006 08:02 AM
How to append hostname in a script anjaan Programming 5 06-14-2004 10:41 AM
How to append today's date in a script anjaan Programming 4 06-12-2004 08:37 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration