10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Newbie here. My goal is to have the expect script log into the Ubuntu 18.04 server and run two commands (lsb_release -a and ip addr) and eventually pipe the output/results to a file. For now, I would be happy to get this one command or two to run successfully. How to fix this?
#!/usr/bin/expect ... (3 Replies)
Discussion started by: jacob600
3 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I have encountered a problem that I am unable to find a workaround for. I have 52 numbers and I need to submit an individual job for each pair combination, so too many to do by hand.
I have created a submission file (submission_code.sh) which contains the following code:
gcta64... (2 Replies)
Discussion started by: tim.morris
2 Replies
3. Shell Programming and Scripting
Hi i have a control file which i need to read. It is ',' separated. the 3rd parameter will be ';' separated.
I have 2 files:
/home/orig.txt
/home/join.txt
I need a O/P file name based on firstparameter_1.txt and it should have the content of /home/orig.txt
and appended content from... (2 Replies)
Discussion started by: Ravindra Swan
2 Replies
4. Shell Programming and Scripting
Hello all.
I am a linux and linux scripting newbie so please forgive my ignorance. I have been tasked to write what I thought should be a pretty simple script that does the following:
1) Loads our forticlient ssl vpn command line client
2) sends the vpn password to the client
Pretty... (2 Replies)
Discussion started by: wblakenc
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
i am writing a bash file and need to list the command name and user for the busiest process ie the one using the greatest percentage of CPU time)
im kind of stuck. i know you should get the highest CPU , sort column 3 then take off the head but i'm un sure how would i do that?
echo... (2 Replies)
Discussion started by: ryoukii
2 Replies
6. Shell Programming and Scripting
I am still learning expect, For the below script I always get This is True as the answer. Tried to debug and does not make sense to me. Not sure, where I am doing the mistake. Need Help! - Thanks
#!/usr/bin/expect -f
set timeout 10
spawn -noecho bash
expect { *$* }
send "test -d... (3 Replies)
Discussion started by: rmsagar
3 Replies
7. Shell Programming and Scripting
Here is my code
#!/bin/bash
username=gnowicki
sed '$s/$/ $username/' < sshd_config 1 <> sshd_config
what this is supposed to do is take the name gnowicki and put it at the end of the last line of the sshd_config and it works except not using the variable, if I put the name "gnowicki" where... (2 Replies)
Discussion started by: slufoot80
2 Replies
8. Shell Programming and Scripting
i am having specific number of input( as per o/p of another script) say 10
like d1,d2,d3....d10
i want to pass these o/p to expect script.But i don't know how to do that
the the input to the expect script should be like this
/expect_script.exp $d1 $d2......$dn
as this "dn" depends in... (6 Replies)
Discussion started by: sagar_1986
6 Replies
9. Shell Programming and Scripting
Would really appreciate it if someone could point out my mistake in this line of code, i've been staring blankly at it trying everything i can think of some time now and coming up with nothing.
#!/bin/bash
echo "Enter Username"
read Username
awk -F: -v var=${Username} '/^var:/... (9 Replies)
Discussion started by: Nostyx
9 Replies
10. Shell Programming and Scripting
Please tell me how to pass variable "a b c" to expect from the shell script
1/ example of input file
# cat in-file
var1 var2 a b c var4
2/ # this is my script - how to pass "a b c" as single variable ?
cat in-file | while read x
do
my-expect x
done
3/ # expect script - how to... (0 Replies)
Discussion started by: breaktime123
0 Replies