10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
2. Shell Programming and Scripting
I have a constraint to follow organization policy. So i do not have much liberty.
ssh -i /opt/nonprod user1@hostone -t bash works while ssh -i /opt/nonprod -t bash user1@hostone fails
How can I get this to work when I am enforced to put -t bash before the user@hostname ?
Will share debug... (3 Replies)
Discussion started by: mohtashims
3 Replies
3. Shell Programming and Scripting
Hello everyone,
I need help in understanding the default value for getopts option's argument in ksh. I've written a short test script:
#!/bin/ksh
usage(){
printf "Usage: -v and -m are mandatory\n\n"
}
while getopts ":v#m:" opt; do
case $opt in
v) version="$OPTARG";;
... (1 Reply)
Discussion started by: da1
1 Replies
4. Shell Programming and Scripting
Cannot combine these two strings into one line, either as a 3rd variable or echo or printing ? Frustrating.
for i in `cat /scripts/pathList.dat`
do
OldRepo= grep Oldhostname ${i}/.svn/entries | tail -1
NewRepo= grep Oldhostname ${i}/.svn/entries | tail -1 | sed '/Oldhostname/... (41 Replies)
Discussion started by: pcpinkerton
41 Replies
5. Shell Programming and Scripting
Hi,
I have a generic shell script (runBatchJob.sh) to read files (batchJob) with commands in them and execute the commands by reading the batchJob file as below
./runBatchJob.sh batchJob
batchJob file
$BATCHDIR/execute_procedure.sh
$DATADIR/collectData.sh
$OTHER_ENV_VAR/doSomething.sh
... (10 Replies)
Discussion started by: bOngY
10 Replies
6. Shell Programming and Scripting
I'm trying to set a variable to the output of a command.
This is what the comand output to the display looks like:
/>hciconndump -v TOsiu
Dump of connection(s): TOsiu
----------------------------------------------------------------------
Process: A60Tsiu Connection: TOsiu... (2 Replies)
Discussion started by: troym72
2 Replies
7. Shell Programming and Scripting
Hi there,
I have a wapper script which passes the argument from command prompt to inner script.. It works fine as long as the argument containing single word. But when value contains multiple word with space, not working as expected. I tried my best, couldn't find the reason. Gurus, pls.... (2 Replies)
Discussion started by: kans
2 Replies
8. UNIX for Dummies Questions & Answers
Hi
I executed the code
for file in `ls pdb*.ent`
do
new_name=`echo $file | sed 's/^pdb//;s/.ent/.txt/'`
mv $file $new_name
done
Its giving error at ' ls pdb*.ent' argument list too long
i have around 150000 entries
please help
Thank you (6 Replies)
Discussion started by: empyrean
6 Replies
9. Shell Programming and Scripting
Greetings all,
I'm currently making use of the $HOME/.ssh/rc file to launch an automated shell script immediately after the user has been verified through ssh.
The current problem that I'm facing now is that I am unable to use the "read" command anymore... seems like the "read" statements are... (0 Replies)
Discussion started by: rockysfr
0 Replies
10. Shell Programming and Scripting
I'm new to unix scripting. How would I go about pulling the first 3 characters from a variable in ksh and storing in another variable? Thanks. (9 Replies)
Discussion started by: steve6368
9 Replies