10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
i have a code in which when doing a for loop, i need to direct the output to two files, one just a single output, the other to always append (historical reasons).
So far i managed to do the following, which is working, but am still considering it as "dirty".
... (4 Replies)
Discussion started by: nms
4 Replies
2. UNIX for Dummies Questions & Answers
I have a shell script that runs on our webserver logs, and grabs various useful data and then outputs this data to a .csv file.
What I want to do now is schedule a cronjob to run this script for me each week at a designated time, AND email the .csv file that is created as an attachment to... (1 Reply)
Discussion started by: xdawg
1 Replies
3. Shell Programming and Scripting
Hi,
I am working on Sun Solaris 5.10 and want to direct the output from a disk space check script to an output file;
#!/bin/bash
CURRENT=$(df -k /log/logs | grep /log/logs | awk '{ print $5}' | sed 's/%//g')
THRESHOLD=30
if ; then
echo "Remaining free space is low" > output.txt
else... (10 Replies)
Discussion started by: SSKAAB
10 Replies
4. UNIX for Dummies Questions & Answers
Hi, i'm trying to gather details from remote hosts and want them to be written to my local linux machine from where i'm using SSH. My command looks some thing like this
ssh -q remotehost 'bash -s' <command.txt
where command.txt is a file in my local machine containing
ps -ef |grep httpd |... (1 Reply)
Discussion started by: poga
1 Replies
5. Shell Programming and Scripting
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
Discussion started by: the0nion
7 Replies
6. Solaris
I need to reconfigure Sendmail to strip the SMTP email addresses from all email and replace them with a single address used for testing purposes.
I have a vended application hosted on Solaris 10 servers. I have access to support the application framework (IBM WebShere Application Server 6.1),... (1 Reply)
Discussion started by: dunkar70
1 Replies
7. Shell Programming and Scripting
Hi All,
I am a newbee in unix but still have written a shell script which should trigger a mail based on certain conditions but the problem is that my file is not being read. Below is the code please advise. I do not know where is it failing.
Note $ and the no followed with it is the no of... (1 Reply)
Discussion started by: apoorva
1 Replies
8. Shell Programming and Scripting
I can run this from the command line:
scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send
and I get:
file_to_send 100% |***************************************************************************| 0 00:00
but if I do:
scp -i identfile... (6 Replies)
Discussion started by: NewSolarisAdmin
6 Replies
9. Shell Programming and Scripting
Hi,
I have a script to compare 2 files.
file1=$1
file2=$2
num_of_records_file1=`awk ' END { print NR } ' $file1`
num_of_records_file2=`awk ' END { print NR } ' $file2`
i=1
while
do
sed -n "$i"p $file1 > file1_temp
sed -n "$i"p $file2 > file2_temp
diff file1_temp... (5 Replies)
Discussion started by: autosys_nm
5 Replies
10. Shell Programming and Scripting
Is there any way to combine the following two statements into one? I can't figure out how to get expr to take input from the output of the awk call - I've tried piping the output of the awk call into the expr call, and tried using a 'Here' document, nothing seems to work.
export CNT=`wc -l... (4 Replies)
Discussion started by: jvander
4 Replies