03-09-2007
Variable for User Comment
SCO 5.06
Is there a variable that holds a user's comment?
In scoadmin -account, there's a comment field which we normally
populate with the user's name.
Or ... am I better off greping /etc/passwd?
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file that has a list of entries in a column
x
z
z
z
x
y
z
The column can have any length and any number of any strings. I need to replace each unique string with a user defined number. I can filter the unique entries out using
awk '{if (NF==5) print $2}' file | uniq | nl >... (1 Reply)
Discussion started by: ce124
1 Replies
2. Shell Programming and Scripting
I am a newbie to programming on the unix Command Line*, and was wondering how you take what a user types in and convert it into a variable to be used in the script?
*I always used it for file editing, but nothing more. Then I began to use BBedit.
:confused: (1 Reply)
Discussion started by: signebedi
1 Replies
3. Shell Programming and Scripting
Hi!
I want to print selected lines from a file using awk.The file contains 6 columns(dates,time,title,description,location and attendees). So i ask the user to insert the date that he wants to display and then search the file for the matching dates so i can print the line.
echo Give the date... (7 Replies)
Discussion started by: DDoS
7 Replies
4. Shell Programming and Scripting
Hi,
I have a user defined variable _TIME1=xxx
I am using awk command for pattern matching.
cat $_LOCATION/catalina.txt | awk '/^`$_TIME1`:??:??/'
It not taking the value of $_TIME!
eg:I am using the command to get all the patter from 12:00:00 to 12:59:59
The user defined variable... (2 Replies)
Discussion started by: ahamed
2 Replies
5. Programming
in a C program, how do you access the unix environment variable USER for example? (1 Reply)
Discussion started by: omega666
1 Replies
6. Shell Programming and Scripting
Please tell me how to write a bash script that asks the user to enter a word and that passes the entered word to a variable.
echo "Type a word and press the Enter key:"
myVar=`cat`
echo "You entered $myVar"
The above code is very awkward, because it requires the user to enter... (2 Replies)
Discussion started by: LessNux
2 Replies
7. UNIX for Dummies Questions & Answers
this may be basic thing for everyone here, but i cant push awk to print the variable user input which is INS, please help.
code:
INS=$1
printf '\n'
symdg list | grep $INS-clone | awk -v i=$INS '{ID=substr($4,9,4)}{print "Device Group: "$1,"at Array "ID,i}'
output:
$ ./test.sh patty
... (5 Replies)
Discussion started by: prodigy06
5 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone,
Is it possible to define blank vaianbles and prompt user to fill them during the script execution?
A very simple example:
INPUT=
OUTPUT=
cut -f1-4 $INPUT | sed 's/hello/goodbye/g' | sort -uV > $OUTPUTThank you in advance!
Best wishes (2 Replies)
Discussion started by: lsantome
2 Replies
9. UNIX for Advanced & Expert Users
Heyas
So while i'm trying to increase security/usability of my TUI commands, i'm currently at tui-conf-get.
There was also a bug, i wanted to fix, but sadly that bugfix is more insecure - but twice as fast as my current buggy method.
I've added a getopts toggle, '-s' to toggle beSecure,... (8 Replies)
Discussion started by: sea
8 Replies
10. Solaris
I am new to smf...I am trying to create new smf service and starting a Python daemon script. The python daemon script will call few other scripts internally as subprocess. The scripts which are called by daemon are unknown of user environment variables. How can I execute smf service in user... (1 Reply)
Discussion started by: Sivaramakrishna
1 Replies
LEARN ABOUT DEBIAN
atunlock
atlog(3) AtFS Toolkit Library atlog(3)
NAME
atSetComment, atUnlock - log and lock handling
SYNOPSIS
#include <atfs.h>
#include <atfstk.h>
int atSetComment (Af_key *aso, int commentType, char *commentText, int mode);
int atUnlock (Af_key *aso);
DESCRIPTION
atSetComment sets a comment attribute for the attributed software object aso. Valid commentTypes are
AT_COMMENT_INTENT
for expressing a change intent describing planned modifications.
AT_COMMENT_DESCR
for issuing a descriptive text expressing the purpose of the document.
AT_COMMENT_LOG
for writing a change log describing the changes made.
With the argument commentText, a default text may be given. According to the mode (see below), the user will be asked for entering the
comment attribute value. When a default text is given, this will be offered for modification. With an commentText argument, the previous of
the according comment attribute is taken as default text.
With the mode field, the behavior of atSetComment can be influenced. Three flags may me set:
AT_FROMSTDIN
advises atSetComment to read the user input from standard input, otherwise an editor will be started.
AT_REUSE causes reuse of the comment text expressed during the previous invocation of atSetComment, if there was any.
AT_CONFIRM lets the user confirm, that an comment shall be expressed. Otherwise, atSetComment asks for the comment text without prior
confirmation. This flag is ignored, when AT_FROMSTDIN is set and the change comment is taken from standard input.
atUnlock unlocks aso by calling af_unlock (manual page af_lock(3)). If a change intent was previously set for aso, this will be eliminated.
DIAGNOSTICS
atSetComment and atUnlock return FALSE (zero) on error. Additionally, the atError variable is set and afErrMsg holds a diagnostic message.
ENVIRONMENT
EDITOR - the default editor to be called.
SEE ALSO
af_lock(3)
AtFStk-1.12 Fri Jun 25 16:39:38 1993 atlog(3)