The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
su (switching to other user) bjagadeesh Shell Programming and Scripting 1 05-20-2008 10:27 AM
switching to another user in shell script... bjagadeesh Shell Programming and Scripting 1 02-28-2008 07:10 AM
switching user from root to ordinary user sasia Shell Programming and Scripting 3 01-25-2008 10:25 PM
FTP - switching user syntax daveaasmith UNIX for Dummies Questions & Answers 1 09-05-2007 08:03 AM
Switching to single-user mode gmoyano UNIX for Dummies Questions & Answers 1 08-05-2002 09:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2008
bjagadeesh bjagadeesh is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 9
su (switching to other user)

Hi,

what is the use of the double quotes and !! in the following code segment:

su - user1 << ""!! > /dev/null 2>&1
echo "welcome user1"
EOF
!!

also what is the difference between below:

su - user1 << ""!! > /dev/null 2>&1 and
su - $USER << ""!!!> /dev/null 2>&1.

Note: $USER = user2


Jagadeesh.
  #2 (permalink)  
Old 05-20-2008
psiva_arul's Avatar
psiva_arul psiva_arul is offline
Registered User
  
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
<<!! means HERE DOC label

Hi,
in UNIX su command used for change the one user account to asnother user account.

in your code change the user1 account into other user account that code will ask the new user login detials and print the new user login details


Regards,
MPS
Bangalore
  #3 (permalink)  
Old 05-21-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is online now Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
duplicate post, proceed here
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0