Store command in a Var problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Store command in a Var problem
# 8  
Old 01-29-2009
Replace
Code:
version= `ssh itadmin@192.168.1.200 "svnadmin verify /home/svn/$projname"` # this one, when I use the script in the terminal, it prompts me the right thing but it seams that the var version doesn't receive the content of the command

with
Code:
version= `ssh itadmin@192.168.1.200 "svnadmin verify /home/svn/$projname 2>&1"`

# 9  
Old 01-29-2009
Quote:
version= `ssh itadmin@192.168.1.200 "svnadmin verify /home/svn/$projname 2>&1"`
bash: -c: line 0: syntax error near unexpected token `newline'
bash: -c: line 0: `svnadmin verify /home/svn/repos 2>'
Version control revision:

worse than before
# 10  
Old 01-29-2009
Try:
Code:
version= `ssh itadmin@192.168.1.200 '"svnadmin verify /home/svn/$projname 2>&1"'`

It's a quoting problem. Note the single quotes before the first double quote and after the last double quote.
# 11  
Old 01-29-2009
Man sorry but your thing is still wrong

Check this. If when I use:
Quote:
list=`ssh itadmin@192.168.1.200 "ls /home/svn"`
it works
when I do:

Quote:
projname=`zenity --entry --text "$list

Enter the project name that you want to create "`
it works
when I do
Quote:
svnadmin verify /home/svn/$projname
from the command line it works but doesn't store in the var. Man it seams that everything is ok but doesn't work and I'm very upset with this

but thanks
# 12  
Old 01-29-2009
On the command line, do:
Code:
svnadmin verify /home/svn/$projname 2>/dev/null

What do you get?
# 13  
Old 01-30-2009
Quote:
Originally Posted by otheus
On the command line, do:
Code:
svnadmin verify /home/svn/$projname 2>/dev/null

What do you get?
I don't receive nothing. Executes but nothing in the verbose.
This is very strange. I have to continue my project and forget this for some time.
but thanks anyway
# 14  
Old 01-30-2009
Quote:
Originally Posted by ruben.rodrigues
I don't receive nothing. Executes but nothing in the verbose.
That's what I expected. It outputs to standard error (STDERR). The answer I gave you earlier (with 2>&1 )should work.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Configuring 'auditd' service to not store the audit logs in /var partition

Hello all, I've configured 'audit' service to send the audit logs to a remote log server (by using syslog plugin), which is working fine. However, there is a problem. audit service also tries to write same information (but in binary format) in /var/audit path. So, Is there anyway to stop... (2 Replies)
Discussion started by: Anti_Evil
2 Replies

2. Ubuntu

problem with /var/mail directory

Hi, There is no "administrator" file in "/var/mail" directory........ can any one tell me what could be the reason for that?...and also how to resolve that??? Thanks, ~Kavi (4 Replies)
Discussion started by: kavi.mogu
4 Replies

3. Solaris

Disk problem? from /var/adm/messages

Hi all, I got the following error message from solaris 10 system. Security Violations =-=-=-=-=-=-=-=-=-= Jun 1 01:48:21 unix009 scsi: ASC: 0x44 (internal target failure), ASCQ: 0x0, FRU: 0xbc The following are from /var/adm/messages Jun 1 01:48:21 unix009 scsi: WARNING:... (7 Replies)
Discussion started by: lramsb4u
7 Replies

4. Solaris

SVM Problem Regarding /var

Hi Guys! I am facing Problem with SVM I mention the problem below: I have Sunfire V210 machine and the partitions are as follows: Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 6134 29.77GB (6135/0/0) 62429760 1 swap wu ... (1 Reply)
Discussion started by: sensation
1 Replies

5. Shell Programming and Scripting

date output store in variable problem

When I run following command date Output1 => Thu Sep 9 03:26:52 IST 2010 When I store in a varibale as a=`date` echo $a output2 => Thu Sep 9 03:27:02 IST 2010 The differnece is, it is trimming the space when I am storing the output in varibale. Output1 = Thu Sep 9 03:26:52 IST 2010... (2 Replies)
Discussion started by: pravincpatil
2 Replies

6. Shell Programming and Scripting

Problem running var (with spaces) as command

I seem to be fighting bash's shell expansions.. I set this variable: CMD="export MVAR=\"1 2 3\"" if I try to run it, it is clear the shell is parsing along the spaces of the contents of MYVAR: > $CMD + export 'MYVAR="1' 2 '3"' + MYVAR='"1' -bash: export: `2': not a valid identifier... (3 Replies)
Discussion started by: bbw
3 Replies

7. UNIX for Dummies Questions & Answers

/var/run/dbus/system_bus_socket problem

Hello, i have a problem. i have a domain name hosted on a server and it goes very slow and sometimes down. I looked on the processes running and on the netstat status and i discovered that each time there is a slowness or a downtime is caused by: /var/run/dbus/system_bus_socket many of these... (9 Replies)
Discussion started by: dan8354544
9 Replies

8. Shell Programming and Scripting

Problem regarding Sed/Echo/Var Init

Greetings, I've visited this forums for a long time and normally got an right answer but this time my problem doesn't seem to go away. What I'm trying to do is the following: VAR="\n\nline1\nline2\nline3\nline4\nline5\nline6\nline7\n\n" (The count of newlines is varying!) If I echo this i... (3 Replies)
Discussion started by: ph1l
3 Replies

9. Shell Programming and Scripting

Open txt and store line in a var

Hi I realy need to find a way to do a script that does the following: search a word in a txt file then store on a var the letters that are on the right like this is an exemple, I want to store from here ...abcdefg... so I need a var that receive ...abcdefg... Is that possible?... (8 Replies)
Discussion started by: ruben.rodrigues
8 Replies

10. Shell Programming and Scripting

Problem with echo for var, padded with spaces

While concatenating 2 values, one which expanded to fixed width & other not, I am not getting value expanded as fixed width. Following is script for the same : #!/bin/sh var1="abc" var2="def" var1Fxd=`echo $var1 | awk '{printf("%-6s",$0)}'` echo $var1Fxd""$var2 But, if I try - echo... (2 Replies)
Discussion started by: videsh77
2 Replies
Login or Register to Ask a Question