10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to write a script to ssh through several hops (e.g. HostA-HostB-HostC-HostD), where Host A does not have direct assess to HostC ; HostB cannot access HostD directly.
when I ssh 3 hops and run command with arg1, arg2 and redirect the output to a file, e.g.
HostA> ssh -t HostB ssh -t... (3 Replies)
Discussion started by: chiensh
3 Replies
2. Shell Programming and Scripting
Hi,
I know with getopts you can pass arguments from the command line
./script -ab -c apple
But it doesn't support 2 or more arguments for ONE option. Is there any other way to do this?
Thanks (2 Replies)
Discussion started by: testa500
2 Replies
3. Shell Programming and Scripting
Hi Gurus,
Need some help with the shell scripting here.
#!/bin/ksh
ps -ef | grep -i sample.ksh | grep -v grep > abc.txt
if
then
echo "sample.ksh is executing"
else
echo "sample.ksh is not executing"
fi (1 Reply)
Discussion started by: jayadanabalan
1 Replies
4. Shell Programming and Scripting
the scenario is -
If I pass 3 three arguments( run time) , it should list all .txt files from a path to temp file
if I pass 2 arguments ( run time) , it should list all .csv files from the same path to another temp file
the above scenario should be handled in single code and also I dont know ... (2 Replies)
Discussion started by: Prashanth B
2 Replies
5. UNIX for Dummies Questions & Answers
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies
6. Shell Programming and Scripting
Hi, hope everyone are fine. Please find my issue below, and I request your help in the same
In a configuration file, i have a variable defined as below
TEST = 'One','Two','Three'
I am trying to pass this variable in to a sql script which is define in a pl/sql block
as follows,
In the... (1 Reply)
Discussion started by: ramakanth_burra
1 Replies
7. UNIX for Dummies Questions & Answers
Okay so I have an alias that looks like this:
ALIAS gscn {
MSG gscn Test1
MSG gscn Test2
MSG gscn Test3
MSG gscn Test4
MSG gscn Test5
}
How do I make it wait 5 seconds between each command before it executes the next one after that in order from top to bottom? I tried the TIMER... (1 Reply)
Discussion started by: guitarscn
1 Replies
8. Answers to Frequently Asked Questions
A good place to start is simple variable passing....
Passing variables from one script to another
The next level is passing a variable into a more complex command such as using a variable in a sed command. There are some simple quoting techniques that are very general. These are mentioned... (0 Replies)
Discussion started by: Perderabo
0 Replies
9. UNIX for Dummies Questions & Answers
I've read the man on the alias command, and I am perplexed. I don't see a way to create an alias that will perform more than one command......is there a way to create an alias that is a string of a commands ? (1 Reply)
Discussion started by: HikerLT
1 Replies
10. UNIX for Dummies Questions & Answers
I want to have an alias for the command
fold -78 filename | lp
How do I set my alias so that the argument passed is filename ??
alias lp='fold -78 | lp'
then
lp filename
wont work cuase this is
fold -78 | lp filename (1 Reply)
Discussion started by: pmcg
1 Replies