10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone, after about 2 days of scratching my head on this one, I'm finally ready to punt this and ask for some actual help. Here's the situation. We have 1 server, that runs multiple VM's. To gain access to those VM's we ssh from host01 to the other vm hosts. For example when we first log... (4 Replies)
Discussion started by: Lost in Cyberia
4 Replies
2. Shell Programming and Scripting
Hi Guys,
So what I am trying to do is :
Host A should do a SSH to Host B to F. Login to the remote host and gather the output of uptime and write to to a file in HostA.
So by the end of the script, HostA should contain a file that contains the uptime output of Host B,C,D,E,F.
Right now... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
3. UNIX for Dummies Questions & Answers
Hi, i'm trying to gather details from remote hosts and want them to be written to my local linux machine from where i'm using SSH. My command looks some thing like this
ssh -q remotehost 'bash -s' <command.txt
where command.txt is a file in my local machine containing
ps -ef |grep httpd |... (1 Reply)
Discussion started by: poga
1 Replies
4. UNIX for Dummies Questions & Answers
Team,
we use below command to store the contents in a logfile.
cat a.txt > a.log
a.txt content is
123
345
Is there any options available to store the command used also?
for eg a.log may show as
cat a.txt
123
345 (5 Replies)
Discussion started by: sid2013
5 Replies
5. Shell Programming and Scripting
I have a file
# cat /root/llll
11
22
33
44
When I cat this file content to a variable inside a shell script and echo that shell script, it does not show up as separate lines. I need echo output similar to cat.
cat /root/shell_script.sh
#!/bin/bash
var=`cat /root/llll`
echo $var (2 Replies)
Discussion started by: anil510
2 Replies
6. Shell Programming and Scripting
There is a file on a remote host that I want to read across an ssh tunnel. NOT copy... scp won't work here. And this file requires elevated permissions to read.
'ssh -t remotehost sudo cat /path/to/file' will prompt me for my sudo password and read out the file. But I'm coming up blank for a... (4 Replies)
Discussion started by: jnojr
4 Replies
7. Shell Programming and Scripting
Hi All,
I have an input file containing data as below:
Input.DAT
XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111... (11 Replies)
Discussion started by: sagar.cumar
11 Replies
8. UNIX for Dummies Questions & Answers
I use the cat command to concatenate text files, but one of the rows I was expecting doesn't display in the output file. Is there a verbose mode\logging mechanism for the cat command to help me investigate where the lines I was expecting are going??
cat 7760-001_1_*_06_*.txt | grep -v... (1 Reply)
Discussion started by: Xin Xin
1 Replies
9. Shell Programming and Scripting
Hello,
I'm new to shell scripting and did a search on the forum to what I want to do but couldn't find anything.
I have about 9 routers that outputs to 1 syslog file daily named cisco.year.mo.date.log ex: cisco.2009.05.11.log
My goal is to make a parsing script that cats today's syslog... (2 Replies)
Discussion started by: jjrambar
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
This is what I am trying to do.
1) connect to 3 remote servers from my local machine
serverA serverB serverC
2) read error file from each server
cat /var/lib/mysql/mydb.err
3) grep for lines displaying "yesterday" date
grep "`date +%y%m%d' '-d\"1 day ago\"`"
4) Append those lines to a... (7 Replies)
Discussion started by: shantanuo
7 Replies