10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
2. Shell Programming and Scripting
Good Morning,
I have a copy script on Solaris 9 machine that is supposed to copy some files to a NAS using: cp -r /dir/dir/ /dir/dir/dirThe script doesn't finish. The directory contains user files of which one seems to copy fine, a second was failing until I did achmod -R -777 to it. Now,... (6 Replies)
Discussion started by: Stellaman1977
6 Replies
3. Shell Programming and Scripting
Hi, the following command works in the terminal no problem.
samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 Replies
4. Shell Programming and Scripting
Hi'
i am runing a script thats run with a loop...while loop true.
when i exit the server..logon and again the script doenst run.
its a bash script test.sh.
i run it as:
#./test.sh &
what can be the priblem please?
thanks alot (6 Replies)
Discussion started by: zigizag
6 Replies
5. Shell Programming and Scripting
I have made a shell script(/bin/sh) that starts a perl script (that I haven't made my self) that's starts a ssh session. The ssh session uses a private/public key to login so no password is needed. The Perl script works perfect.
But when I put it in a cronjob (crontab) the ssh connection asks... (6 Replies)
Discussion started by: splinter_cell
6 Replies
6. Shell Programming and Scripting
Hi all,
When I cp a script, this section of the code stops reading from a file.
if ; then
while read dirtoclean
do
DIRSTOCLEAN=${DIRSTOCLEAN}' '$dirtoclean
done < ${BASEDIR}test.conf
fi
${DIRSTOCLEAN} doesn't return anything, even though it will work right before... (6 Replies)
Discussion started by: nicksantos1
6 Replies
7. OS X (Apple)
Hi All
I have this script that checks to see if ntp is enabled on a machine
launchctl load -w /System/Library/LaunchDaemons/org.ntp.ntpd.plist
It retuns
org.ntp.ntpd: Already loaded
if it is loaded, is there a way to script it so that if it is loaded it does not say anything but... (2 Replies)
Discussion started by: ab52
2 Replies
8. UNIX for Dummies Questions & Answers
Hey, I am trying to write a script that will open all of my session windows, and then secure shell into the appropriate server in the new windows. Seems simple, but I cant get it to work! Please help! :confused: (1 Reply)
Discussion started by: sojo1024
1 Replies
9. Shell Programming and Scripting
My script is very simple. It call isql and then echo a message. The problem is after the 1st command (isql), it stops so that the echo line never gets executed. Can anyone let me know what is wrong?
#!/usr/bin/sh
userid=xxxx
server=xxxx
db=xxxx
pwd=xxxx
isql -U ${userid} -S ${server}... (3 Replies)
Discussion started by: robbyls
3 Replies
10. Shell Programming and Scripting
Hello sir,
I want to monitor my work on the terminal.I know we can use script command.But every time when I start the terminal, I have to type script to start it.I want to automate it. So where should I include this command so that it will start as soon as I start the terminal ???? (2 Replies)
Discussion started by: nsharath
2 Replies