The UNIX and Linux Forums  

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
printf arunviswanath High Level Programming 2 09-19-2007 10:31 PM
printf command in ksh cin2000 Shell Programming and Scripting 1 12-21-2005 02:48 PM
find: problems escaping printf-command string grahamb Shell Programming and Scripting 1 12-04-2005 04:00 PM
need help with printf command nymus7 Shell Programming and Scripting 1 04-21-2005 08:05 PM
printf command FIRE Shell Programming and Scripting 2 08-07-2002 03:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-30-2006
bebop1111116 bebop1111116 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 30
the printf command

hello, Im at another part of the program i am writing. Where i think i'm going to need to use the printf command.

If anyone can help me figure out the printf layout i would greatly appreicate it.

thanks

Last edited by bebop1111116; 10-01-2006 at 10:49 PM..
  #2 (permalink)  
Old 09-30-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Code:
printf "%-10s%5s%-25s%-s" $str1 $str2 $str3 $str4
  #3 (permalink)  
Old 09-30-2006
bebop1111116 bebop1111116 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 30
just wanted to clarify, what do the $str1 $str2 ... represent?
  #4 (permalink)  
Old 09-30-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
its the string which you want to print
  #5 (permalink)  
Old 10-01-2006
nathan nathan is offline VIP Member  
Supporter
  
 

Join Date: Jul 2006
Posts: 156
just a clarification

Quote:
/etc/passwd is the command interpreter which is
supposed to be run when a user logs in. and i believe that if a wrong password is entered then it is supposed to have /bin/false in the last field.
This isn't quite how it works. The /etc/passwd file isn't a command interpreter, it's just a plain text file in UNIX, although a very important one. The login command checks the file (and possibly /etc/shadow, or /etc/security/passwd) to verify that the username and password entered are correct. It also looks at the home directory and the shell. If you enter the correct userid & password, it will drop you into your home directory and execute the shell listed in the passwd file. If you enter an incorrect password, /bin/false is not executed, but the program "login" will itself deny access to the system.
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 11:39 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