12-12-2012
Sample of source file, please.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I need some help to create a script which contain a few strings on every line, and use those strings in a loop to fire some commands.
for exmaple the file looks like
tom
dave
bill
andy
paul
I want to read one line at a time and use it in loop like
command tom
command dave... (3 Replies)
Discussion started by: xboxer21
3 Replies
2. UNIX for Dummies Questions & Answers
Hi ,
can some give me idea about how to use do...done while loop in UNIX to read the contents of a file.. (2 Replies)
Discussion started by: sreenusola
2 Replies
3. Shell Programming and Scripting
Guys,
I am trying to read the whole file using while loop but when i run the ssh part of the script it reads only the first line and exit after that.
There are in total 134 lines in the file, but when the output is redirected, it does only for one line and comes to command prompt.
pls help..... (11 Replies)
Discussion started by: sdosanjh
11 Replies
4. Shell Programming and Scripting
I know I should be able to see a way of doing this easily, but my brain just won't engage.
I have a script working on an embedded device that checks to see if an item is in a blacklist before performing some actions.
At the moment the code reads thus....
while read BLACKLIST ; do
... (7 Replies)
Discussion started by: Bashingaway
7 Replies
5. Shell Programming and Scripting
I have written a script to read the file line by line.
It is reading and printing the lines.
But it is coming out of loop before reading last line.
So I am not able to print last line.
How do I solve it. (6 Replies)
Discussion started by: dgmm
6 Replies
6. Shell Programming and Scripting
Hi
As a newbe in scripting, i struggle hard with my first script.
What i want to do is, bringing data of two files together.
file1:
....
05/14/12-04:00:00 41253 4259 5135 5604 5812 5372
05/14/12-04:10:00 53408 5501 6592 7402 7354 6639
05/14/12-04:20:00 58748 6037 7292 8223... (13 Replies)
Discussion started by: IMPe
13 Replies
7. Shell Programming and Scripting
Hello,
I have a set of files Xfile0001 - Xfile0021, and the content of this files (one at a time) needs to be printed between some line (lines start with word "Generated") that I am extracting from another file called file7.txt and all the output goes into output.txt. First I tried creating a for... (5 Replies)
Discussion started by: jaldo0805
5 Replies
8. Shell Programming and Scripting
Hello,
I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop ,
while IFS=: read -r line
do
set $dsc=$line
echo 'printing line variable ' $line... (1 Reply)
Discussion started by: ParthThakkar
1 Replies
9. Shell Programming and Scripting
I have a file1.txt with several 100k lines, each of which has a column 9 containing one of 60 "label" identifiers. Using an labels.txt file containing a list of labels, I'd like to extract 200 random lines from file1.txt for each of the labels in index.txt.
Using a contrived mini-example:
$ cat... (8 Replies)
Discussion started by: pathunkathunk
8 Replies
10. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
LEARN ABOUT MOJAVE
userselector
UserSelector(7) BSD Miscellaneous Information Manual UserSelector(7)
NAME
UserSelector -- overview and documentation
DESCRIPTION
UserSelector is invoked only internally by the CryptoTokenKit framework. It is not intended to be used directly by an end user or an adminis-
trator. Unless the string property UserSelectorPath is set with full executable path value in the configuration file (
/etc/SmartcardLogin.plist ), the system UserSelector is used.
How CryptoTokenKit framework invokes UserSelector:
UserSelector -o operation -u username -i pubkeyhash1[,pubkeyhash2,...]
Path and format
UserSelector runs in a sandbox which limits its path and file format. A custom UserSelector must be stored in the /Library/CryptoTokenKit
directory. The file format of the UserSelector must be binary. Shell scripts are not supported.
Supported Operations
Map Operation
This operation returns a list of users bound with pubkeyhashes from the SmartCard certificates. The username parameter is optional. If set,
bindings are returned only for the specified user. The list of one or more comma separated pubkeyhashes is mandatory.
Result format:
Recognized bindings are returned through stdout. Each binding is placed on a separate line. Each line begins with the pubkeyhash string, fol-
lowed by the TAB character ( ) and by the username.
Sample:
$ UserSelector -o map -i 01234567890123456789,ABCDEF01230123456789,98765432109876543210
ABCDEF01230123456789 user1
98765432109876543210 user2
Bind Operation
This operation creates binding between the provided pubkeyhash and username .
Result format:
Exit code is set to 0 when succeeded, error code otherwise
Sample:
$ UserSelector -o bind -i ABCDEF01230123456789 -u username1
Unbind Operation
This operation removes SmartCard bindings for the provided username If no pubkeyhash is provided, all bindings for that user are removed. If
one or more pubkeyhashes are provided, only bindings for these are removed.
Result format:
Exit code is set to 0 when succeeded, error code otherwise
Sample:
$ UserSelector -o unbind -u username1 -i ABCDEF01230123456789
Check Operation
This operation checks SmartCard bindings for a specific user. It returns 0 on stdout when the user has no SmartCard bindings, or 1 when
already does. The username parameter is mandatory.
Sample:
$ UserSelector -o check -u username1
1
SEE ALSO
SmartCardServices(7), sc_auth(8)
macOS Oct 12, 2017 macOS