Help me with Echo Command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help me with Echo Command
# 1  
Old 06-11-2012
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
KalaielaSmilie

Last edited by Scrutinizer; 06-11-2012 at 11:09 AM.. Reason: code tags
# 2  
Old 06-11-2012
What OS and shell?

This works fine for me on Arch Linux using the Bash Shell and Red Hat using the Bash Shell.
# 3  
Old 06-11-2012
Quote:
Originally Posted by Kalaiela
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
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?
# 5  
Old 06-12-2012
Hi All, I am using HP-UX machine with sh shell.

Thanks for your replies...Smilie
# 6  
Old 06-12-2012
Does it do the same with a diffent shell, for example /usr/dt/bin/dtksh or bash if that is installed..
# 7  
Old 06-12-2012
Hi Scrutinizer

I have no idea about how it works other than sh shell.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

2. UNIX for Dummies Questions & Answers

New line in Echo command

Hi , This might sound little familar to you guys, but am struck with something. i have an IF conditioned loop which will determine a variable to get used in the later part of the script. if ; then if ; then Var_name="This is first line.This is second line.This is... (11 Replies)
Discussion started by: scott_cog
11 Replies

3. Shell Programming and Scripting

Echo output from command

Hello i am trying to do some calculation from output command for example ls -l if then echo "error" else echo "$" fi its something like this which get strings from output command and try to sum total lines of this string if exceed certain number it display error if not it... (3 Replies)
Discussion started by: mogabr
3 Replies

4. Shell Programming and Scripting

Echo Command Help

Hi All I want to use the echo command to had some lines to a file but the lines i want to have contain " and ; here is my command system("echo user_pref("accessibility.typeaheadfind.flashBar", 0); > $profile"); but i think there are too many " and so it barfs n e ideas thanks A (5 Replies)
Discussion started by: ab52
5 Replies

5. Shell Programming and Scripting

What does following echo command do?

Can anybody tell me what does following command do? # echo gsoc1 | ./configure_cmd.sh Regards, akash mahakode (1 Reply)
Discussion started by: akash_mahakode
1 Replies

6. UNIX for Dummies Questions & Answers

echo command and piping

Hi, I have heard you can use the echo command and piping together and was wondering if you can help me out. I want to be able to use the echo command and pipe together to tell me how many files are in my current working directory, which have only my username read, write and execute... (4 Replies)
Discussion started by: rushhour
4 Replies

7. UNIX for Dummies Questions & Answers

Echo command with $$ $# $@

Hi, Good morning. Would you please explain to me what does it mean by the following command. echo "$$ $# $@" >> /opt/ftp_generic_send.log I know that something is being directed to log file, but not sure what exactly mean by those $$ and $# and $@ means. Thank you for your help.... (3 Replies)
Discussion started by: howdy
3 Replies

8. Shell Programming and Scripting

Help in sorting echo command

Hi, I have a simple question on bash. If i printed out something like below echo -e $q"\t\t\t"$r"\t\t\t"$s"\t\t\t"$u"\t\t\t" |sort -r >>test.txt It cant able to sort the $q value. I tried on -nr option but still the same. For your info, the $q value is actually a floating point. I would... (3 Replies)
Discussion started by: ahjiefreak
3 Replies

9. Shell Programming and Scripting

what does echo $$ command display

whats the value stored in $$ (2 Replies)
Discussion started by: suri
2 Replies

10. AIX

Echo Command to Tape

I've just got a new server running AIX5.3 When I Try this command: echo ABC123 > /dev/rmt0 I get the following message : A system call received a parameter that is not valid It worked OK on 4.3. Has something changed in the operating system> (0 Replies)
Discussion started by: gordbaby
0 Replies
Login or Register to Ask a Question