Sponsored Content
Top Forums Shell Programming and Scripting IF $USER is not in this list of users, then do this Post 302361987 by glev2005 on Wednesday 14th of October 2009 03:54:16 PM
Old 10-14-2009
Perfect, thanks so much! clever solution.

---------- Post updated at 03:54 PM ---------- Previous update was at 03:53 PM ----------

Code:
if [ [ $? -eq 0 ] ; then

Why the double brackets after if, and only on one side?

Last edited by Yogesh Sawant; 02-10-2011 at 07:17 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

su - user... how to find out the list of users and their passwords..

hi, to do a su - user, we need to know what are the users... so in unix 1) which file to see the list of users, passwords? (2 Replies)
Discussion started by: yls177
2 Replies

2. AIX

Script allows user to kill other users: I'd like to know HOW...

Hello list, Have a problem that's highlighting gaps in my knowledge; can you assist? We have a script that's tacked onto our trading application which allows branch managers etc. to kill off the sessions of other users at their branch. A menu option in the application spawns a shell running... (8 Replies)
Discussion started by: alexop
8 Replies

3. AIX

cloning users access with different user name

Hi! this would be my first time to post here in this forums, hope you can help me with my queries. i would like to create a different user name but have the same access rights. Example: root > rootbaby. thanks (5 Replies)
Discussion started by: HPL1706
5 Replies

4. UNIX for Dummies Questions & Answers

User Name and Password List/adding and removing users.

Hello everyone and let me start off by thanking anyone who can help with this. I work for a company that uses Unix as one of their servers. I'm not at all familar with Unix beyond logging after I restart the server:rolleyes: I'm looking for some command that will bring me up a list of current... (3 Replies)
Discussion started by: disgracedsaint
3 Replies

5. Shell Programming and Scripting

script to ignore the user from list of users

Hi, I have a situation where I want to ignore few users from list of users and print rest of user in log file. say, I want to ignore aaa, bbb, ccc, ddd .. ppp from list of 20 user (do not want to include) What is the good command or any script? Thanks in advance. (1 Reply)
Discussion started by: sumit30
1 Replies

6. UNIX for Advanced & Expert Users

list of users

Hello!Does anybody know how to solve this script: ,,write a shell script which displays a list of names of users who have created files "*. c" in the last day."? (1 Reply)
Discussion started by: theodoraa
1 Replies

7. UNIX for Dummies Questions & Answers

Not able to switch to other users using su -user from root

Hi all, I have a small problem. When I log in as root and try to switch to any other user using su -user, then it is giving an error saying libncurses.so permission denied. Can you help me? Thank you in advance. Sai. (1 Reply)
Discussion started by: sai2krishna
1 Replies

8. UNIX for Advanced & Expert Users

Need to find the user id of all users in UNIX

I need to find all the unix user id's of all the users in unix... is there any such command... pl help out (6 Replies)
Discussion started by: Syed Imran
6 Replies

9. UNIX for Dummies Questions & Answers

Users list

Hi i would like to know were the folder that contain file with list of all users ? And were i can learn about what kind of folder i have and wheat they have inside? question 2. when i write ls -a i see all directories and then i choose for example Documents and inside Documents i typed again... (1 Reply)
Discussion started by: iliya24
1 Replies

10. Shell Programming and Scripting

List the Manager of Users in AD - Using list- Get-ADuser

Is there any command that can used in Linux that export usernames and their manager's name from AD using bash shell script? I know this can be done using powershell but I need to use Linux for this procedure. (2 Replies)
Discussion started by: dellanicholson
2 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 01:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy