Skip to main content
21 events
when toggle format what by license comment
Feb 14, 2019 at 5:34 vote accept Sandeep Singh
Feb 14, 2019 at 5:34 vote accept Sandeep Singh
Feb 14, 2019 at 5:34
Feb 11, 2019 at 8:29 vote accept Sandeep Singh
Feb 14, 2019 at 5:34
Feb 11, 2019 at 8:29 vote accept Sandeep Singh
Feb 11, 2019 at 8:29
Feb 8, 2019 at 18:35 answer added Sandeep Singh timeline score: 0
Feb 8, 2019 at 16:59 history edited Sandeep Singh CC BY-SA 4.0
edited title
Feb 8, 2019 at 16:43 history edited Sandeep Singh CC BY-SA 4.0
edited title
Feb 8, 2019 at 16:20 review Close votes
Feb 9, 2019 at 9:19
Feb 8, 2019 at 12:26 answer added jas- timeline score: 0
Feb 8, 2019 at 12:01 comment added terdon @SandeepSingh if the script is working, then you are not running the script you have in your question. Please correct the issues I mentioned in my comment.
Feb 8, 2019 at 11:54 comment added Sandeep Singh @terdon - Script is working fine and i am using same " " to pass my multiple command with ssh.it will be very help full if you guide me any idea or alternate about this code. I am beginner in Shell Scripting track.
Feb 8, 2019 at 10:34 comment added terdon I this really your script? If you run what you show, you will get syntax errors because of the wrong quotes. You need a closing " on the grep line, and you have an extra " on the final fi line. Look at the syntax highlighting (colors) in your question. Please edit and fix it so you show the exact script you are running.
Feb 8, 2019 at 10:32 history edited terdon CC BY-SA 4.0
removed unnecessary whitespace
Feb 8, 2019 at 8:11 history edited Rui F Ribeiro CC BY-SA 4.0
deleted 27 characters in body
Feb 8, 2019 at 7:40 answer added Kusalananda timeline score: 4
Feb 8, 2019 at 7:40 comment added Sandeep Singh I removed "" from $? but still same output. + for b in 'cat /home/sandeepj/Project_finduser01/userslist' + userid=raj.singh + echo -e '\n' + echo -n raj.singh + ssh -t [email protected] 'grep raj.singh /etc/passwd > /dev/null; if [ 0 = 0 ]; then echo -n ' : User 'exsits > /tmp/status else echo -n ' : User not 'exsits > /tmp/status fi'
Feb 8, 2019 at 7:34 comment added Kusalananda You are using double quoted strings within double quoted strings (see "$?" and the other things that you quote within the command you execute with ssh).
S Feb 8, 2019 at 7:34 history suggested Kenneth B. Jensen CC BY-SA 4.0
code format
Feb 8, 2019 at 7:33 review Suggested edits
S Feb 8, 2019 at 7:34
Feb 8, 2019 at 7:31 history edited Kusalananda CC BY-SA 4.0
Markup
Feb 8, 2019 at 7:28 history asked Sandeep Singh CC BY-SA 4.0