Sponsored Content
Top Forums Shell Programming and Scripting Request for file read option in Unix shell scripting Post 302526824 by ciupinet on Wednesday 1st of June 2011 01:57:57 PM
Old 06-01-2011
This one will do the job as well (assuming all the lines start with "Sample "):

Code:
sed "s|^Sample \(.*\)|Sample $(date +%m/%d/%Y) \1|g" a.txt > b.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

2. Shell Programming and Scripting

why shell scripting takes more time to read a file

i have done a coding in shell scripting which reads a file line by line and does something....it takes more than 30 seconds to execute for a single file. when i do the same with perl scripting it takes less than a second. is that shell scripting is not efficient while working with large number of... (1 Reply)
Discussion started by: brkavi_in
1 Replies

3. AIX

Unix shell scripting to find latest file having timestamp embedded...

Hi guys, I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name. Below is the file format: filename_yyyymmdd.csv, i need to pick the latest and move it with the... (2 Replies)
Discussion started by: kaushik25
2 Replies

4. UNIX for Dummies Questions & Answers

Unix Shell Scripting -- update employees not present in input file

ALL, My shell script takes a employee file as input. I have to identify the list of employees not in the input file and update their status in the database. Approach I followed: by traversing through the input file add all the emplid's to a variable. update the status of employees not in... (2 Replies)
Discussion started by: sailussr
2 Replies

5. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

6. Shell Programming and Scripting

generate tabular output from an input text file in unix shell scripting

Hi, I have the output (as below) which i want it to be in a table. For e.g. space utilization in PSE on path /logs is 0% space utilization in PSE on path /logs/tuxedo/tuxlsp is 16% space utilization in PSE on path /ldvarlsp/lsp/log is 37% space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies

7. Shell Programming and Scripting

sh file: READ (menu) but now run with option

I have a script which uses READ to detect choice of menu option...now I want to change the script without doing whole rewrite such that when user runs ./script.sh 5 it would execute menu option 5 rather than user running ./script.sh waiting for it to load and then pressing "5 enter" Is it... (1 Reply)
Discussion started by: holyearth
1 Replies

8. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

9. Shell Programming and Scripting

UNIX Shell Scripting (Solaris) for File Checking

Hi guys, I'm sorry but i badly need your help. I am assigned to do a basic shell script in my job but sadly i don't have any idea on what it is because i am an electronics engineer, but i googled all of it, ask my friends but i cant finalize my scripts. so do please help me. The requirement... (47 Replies)
Discussion started by: daveaztig14
47 Replies

10. Shell Programming and Scripting

Read csv file, convert the data and make one text file in UNIX shell scripting

I have input data looks like this which is a part of a csv file 7,1265,76548,"0102:04" 8,1266,76545,"0112:04" I need to make the output data should look like this and the output data will be part of text file: 7|1265000 |7654899 |A| 8|12660000 |76545999 |B| The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
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
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy