10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In shellscript, I want to display echo message in console and in the log file. please help me to display this message in two places.
I am using below statment to display messsage, but it is displaying in log file only.
echo "Server Already running" >> serverlog 2>&1 (3 Replies)
Discussion started by: Kri
3 Replies
2. Shell Programming and Scripting
Hello
i tried many times echo $variables into text file with no success
for example:
echo "#!/bin/sh
BBHTAG=RFOCLT_check # What we put in bb-hosts to trigger this test
COLUMN=RFOCLT # Name of the column, often same as tag in bb-hosts
$BBHOME/bin/bbhostgrep $BBHTAG | while read... (5 Replies)
Discussion started by: mogabr
5 Replies
3. Shell Programming and Scripting
Hi,
i need to execute echo command to write in a txt file on a remote machine. i did it in this way:
ssh user@remotemachine "echo "put text here" > /home/user/myfile.txt"
I tried to run the same command within a detached screen in this way:
ssh user@remotemachine screen -dm "echo "put... (3 Replies)
Discussion started by: brembo
3 Replies
4. Shell Programming and Scripting
In a Ksh functions, when you have both echo and return respectively - what does it do. E.g.
Func B ()
{
.....
{
.....
echo $Varaible
}
Return 0
}
Func A ()
{
$Var1 = Func B()
....
....
} (6 Replies)
Discussion started by: gagan8877
6 Replies
5. Shell Programming and Scripting
Hello All,
I have a perl script , and the STDERR and additional FH is redirected to the STDOUT like below:
open STDOUT ,">>$log" or die "$! :: $log\n";
open STDERR ,">&STDOUT" or die "$! :: Can redirect STDERR to STDOUT\n";
select STDERR; $|=1;
open LOG ,">&STDOUT" or die "$! :: Can... (2 Replies)
Discussion started by: Alalush
2 Replies
6. UNIX for Dummies Questions & Answers
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies
7. Shell Programming and Scripting
Please help me to simplify my below script.
#!/bin/bash
LOG_FILE=/tmp/log.txt
echo "Hello"
echo "Hello" >> /tmp/log.txt
Is there anyway, that I can echo "Hello" to both screen and file with one single echo command ? (6 Replies)
Discussion started by: phamp008
6 Replies
8. UNIX for Dummies Questions & Answers
Major Newbie here folks. I'm trying to set a variable to my Home directory and then echo it to the screen.
Any and all help is greatly appreciated.
Thanks
Anna (3 Replies)
Discussion started by: amidget
3 Replies
9. UNIX for Dummies Questions & Answers
is it possible to echo 'some text' every 10 minutes on my screen continues ,
without cron. (1 Reply)
Discussion started by: vkandati
1 Replies
10. UNIX for Dummies Questions & Answers
I did a search for this topic but I couldn't find it and I was sure I have seen something similar before (hard because I am not sure of the criteria for the keywords)
What I was looking for was to be able to echo a message to the screen from a bash.sh script at the same time logging it to a... (2 Replies)
Discussion started by: Shakey21
2 Replies