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