10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the below sftp script to transfer a file from a linux host(source) to another linux host(target). Public key is already set up in target host and I am able to transfer file using sftp from source to target.
But not sure why the below script(ftp_script) is not working.
Any help in this... (3 Replies)
Discussion started by: Armaan
3 Replies
2. Shell Programming and Scripting
Hi
Iam running below script in crontab but its not working.
#!/bin/sh
cd /Scripts
/usr/local/bin/expect -f /Scripts/bng_backup.exp /Scripts/data.txt
tar -cf bngbackup.tar bngbackup ;gzip bngbackup.tar
when iam running manually the output file is generating..but bngbackup.tar.gz file... (5 Replies)
Discussion started by: surender reddy
5 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have written an email script in python which sends email to the given id.
I have customized the script for generating space alert inside a shell script as shown below
df -h /microfocus > /tmp/spacereport
## Filter the %usage to variable per
per=$(awk '{if (NR==3){print $4}}'... (0 Replies)
Discussion started by: rakeshkumar
0 Replies
4. UNIX for Dummies Questions & Answers
spath="/home/user/k/${1}"
dpath="/home/user/seq/Nov17/${1}"
cd $dpath
ls -1 $spath > list
c=1
while read list
newlist=`echo $list | sed 's/.gz//' `
newnewlist=`echo $newlist | sed 's/.fastq//' `
do
echo $c
echo $list
c=$(($c+1)) (6 Replies)
Discussion started by: analyst
6 Replies
5. Shell Programming and Scripting
Hi,
I am constantly automaticaly downloading a few things on the internet but since my internet connection is unstable, it sometimes wont work. Thing is the internet will appear to be connected, but no website can be accessed and no program can successfully connect to any location. I can fix... (4 Replies)
Discussion started by: fuzzylogic25
4 Replies
6. Shell Programming and Scripting
I am trying to create a simple ksh loop script. What I've pasted below is not working. Any help is appreciated.
typeset -i count
typeset -i tcount
count=0
tcount=0
while $tcount >= 11
do
print "\$count is $count"
pwd
ls -l
sleep 30
$(( $tcount = $count + 1 ))
... (5 Replies)
Discussion started by: musikman65
5 Replies
7. Shell Programming and Scripting
hi all,
i have installed simple cgi-script
under apache/cgi-bin directory
hello.cgi
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print <<END_HTML;
<html>
<head></head>
<body>Hello, World!</body>
</html>
END_HTML
when i hit the url... (6 Replies)
Discussion started by: raghur77
6 Replies
8. Shell Programming and Scripting
So I need a script that does the following:
If a certain user is logged in
Run `command`
Else
Echo “incorrect user”
This is my first stab...which doesn't work:
#!/bin/bash
X="user=`ls -l /dev/console | cut -d " " -f 4`"
Y="foobar"
echo $X
echo $Y (4 Replies)
Discussion started by: doubleminus
4 Replies
9. Shell Programming and Scripting
why won't below work?
I am trying to see
a)sipfile has username of the system.
b)it will read the sipfile and do a grep function against the /etc/passwd
c)it will save that output to /tmp/result..
but my script is just hanging...
#!/usr/bin/perl -w
open(SIPFILE, "</tmp/sipfile")
... (4 Replies)
Discussion started by: hankooknara
4 Replies
10. Shell Programming and Scripting
Hi everybody
I want to create 20 file using simple script - listed bellow-.
But the script doesn't work.
I hope anyone guide me to correct this script
----------------
The script
integer number=01
until (($number==21))
do
>TELE-LOG-$number
number=$number+01
echo $number
done
exit... (4 Replies)
Discussion started by: so_friendly
4 Replies