10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
If you want to capture the output of any command, we then will be writing the system command in `` or qx.
`` an qx works fine with all linux and windows system commands.
But when I execute the below code.. it is displaying the output on the screen directly instead of storing to variable
... (3 Replies)
Discussion started by: giridhar276
3 Replies
2. Shell Programming and Scripting
I would like to execute a commands in four different servers through ssh at a single instance(simultaneously).
Below are the details with examples,
ssh user1@server1 "grep xxxx logs"
ssh user1@server2 "grep xxxx logs"
ssh user1@server3 "grep xxxx logs"
Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies
3. Shell Programming and Scripting
Hello
In the shell script we have a FTP command like below
ftp -n -v -q winftp.principal.com >/infa/datafiles/GRP/Scripts/ftp_from_infa_dvcn.log<<END_SCRIPT
quote USER $FTP_USER
quote PASS $FTP_PASS
ascii
lcd $FTP_LOCALDIR
cd $FTP_FLDR
put $FTP_FILE
bye
exit
If i... (1 Reply)
Discussion started by: Pratik4891
1 Replies
4. Homework & Coursework Questions
I am a student in BCIT in vancouver and taking comp2771 course.(Shell scripting).
I would like to know what are different ways of executing shell commands?
Thanks (1 Reply)
Discussion started by: adam25ca
1 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to execute a shell script containg awk commands. But unable to do so. Below is my script. Please help.
The name of the script is scan.sh and I have tried executing it using the command sh scan.sh
It is giving an error which reads like:
awk:syntax error near line 7... (3 Replies)
Discussion started by: misb
3 Replies
6. UNIX for Dummies Questions & Answers
I can't get this to work. Running a single command works fine:
find . -name "*.dat" -exec wc -l '{}' \;
gives me the file name and number of lines in each .dat file in the directory.
But what if I want to pipe commands, e.g. to grep something and get the number of lines with that pattern... (3 Replies)
Discussion started by: DJR
3 Replies
7. UNIX for Dummies Questions & Answers
the ssh calling convention:
ssh <server>
If I put commands in the section, ssh will execute them immediately after logging in and return to local shell. I want to stay in the remote shell after executing these commands. How can I achieve this?
Thanks for all. (1 Reply)
Discussion started by: hplonlien
1 Replies
8. Shell Programming and Scripting
Hi,
I am trying to execute a bunch of piped command which are stored in a variable, but only one command executed at a time, and rest of the pipes, commands and their arguments are considered as argument to the very first command.
Can you please help me in this?
bash-2.05$ cat test.sh... (1 Reply)
Discussion started by: prashant.ladha
1 Replies
9. Shell Programming and Scripting
Hey there,
I am trying to pass a command as argument to a function.
The command shows up in $1.
Now I want to execute this command, but if I do a $1
./sample
"bla/blaprintf: warning: ignoring excess arguments, starting with `bla/bla'
The code is :
#!/bin/ksh
fn()
{
$1
}
fn... (3 Replies)
Discussion started by: shriyer
3 Replies
10. UNIX for Advanced & Expert Users
I have to execute some commands after executing one command ( cleartool setview Tagname)
Problem is that I write commands in script like this.
echo "test1"
cleartool setview tagname
echo "test2"
copy file1 file2
echo "test3"
but when I execute script.
Output
---------
test1
If I... (1 Reply)
Discussion started by: udaykishore
1 Replies