Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-11-2012
Registered User
 
Join Date: Apr 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Help me with Echo Command

Hi All

I have the big statement which needs to be appended to the file MANUALLY without opening the file.

So, i tried with echo command


Code:
echo "[18/May/2009:12:08:01] failure ( 4446): for host xx.xx.xx.xxx trying to GET /index.html, wl-proxy reports: exception occurred for backend host 'xx.xx.xxx.xx/12210/12210': 'CONNECTION_REFUSED [os error=150, line 1687 of URL.cpp]: Error connecting to host xx.xx.xxx.xx:12210'" >> errors

Since the error line is too big, it is breaking and not adding it into the file.

Please suggest me the some other method.

Thanks in Advance
Kalaiela

Last edited by Scrutinizer; 06-11-2012 at 10:09 AM.. Reason: code tags
Sponsored Links
    #2  
Old 06-11-2012
in2nix4life's Avatar
Registered User
 
Join Date: Oct 2007
Location: East Coast
Posts: 308
Thanks: 0
Thanked 69 Times in 67 Posts
What OS and shell?

This works fine for me on Arch Linux using the Bash Shell and Red Hat using the Bash Shell.
Sponsored Links
    #3  
Old 06-11-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,407
Thanks: 492
Thanked 2,538 Times in 2,421 Posts
Quote:
Originally Posted by Kalaiela View Post
I have the big statement which needs to be appended to the file MANUALLY without opening the file.
I'm quite afraid you can't alter the file without opening it unless something else has already opened it...
    #4  
Old 06-11-2012
methyl methyl is offline Forum Staff  
Moderator
 
Join Date: Mar 2008
Posts: 6,388
Thanks: 286
Thanked 668 Times in 640 Posts
Quote:
Since the error line is too big, it is breaking
Do you get an error message?
What Operating System and version are you running?
What Shell do you use?
Sponsored Links
    #5  
Old 06-12-2012
Registered User
 
Join Date: Apr 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Hi All, I am using HP-UX machine with sh shell.

Thanks for your replies...
Sponsored Links
    #6  
Old 06-12-2012
Scrutinizer's Avatar
Moderator
 
Join Date: Nov 2008
Location: Amsterdam
Posts: 7,381
Thanks: 144
Thanked 1,756 Times in 1,593 Posts
Does it do the same with a diffent shell, for example /usr/dt/bin/dtksh or bash if that is installed..
Sponsored Links
    #7  
Old 06-12-2012
Registered User
 
Join Date: Apr 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Scrutinizer

I have no idea about how it works other than sh shell.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Echo Command Help ab52 Shell Programming and Scripting 5 02-20-2012 07:44 PM
What does following echo command do? akash_mahakode Shell Programming and Scripting 1 11-16-2009 03:56 AM
Command substitution within an echo ewoods UNIX for Dummies Questions & Answers 3 07-23-2009 04:14 AM
Echo command with $$ $# $@ howdy UNIX for Dummies Questions & Answers 3 11-18-2008 03:32 PM
Help in sorting echo command ahjiefreak Shell Programming and Scripting 3 03-28-2008 06:08 AM



All times are GMT -4. The time now is 08:40 AM.