Sponsored Content
Top Forums Shell Programming and Scripting How to use a string in the for loop? Post 302928885 by RudiC on Tuesday 16th of December 2014 04:03:21 AM
Old 12-16-2014
Why don't you use the same mechanism as you do for DT? And, why passing the whole through the "a" variable?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

if statement in for loop of a string

I am attempting to pass a string into awk and loop through it, and then for every occurrance of a certain character perform an action. In this case, for example, echo 1 for each time character r is found in the string. Except I can't get it to work. Could someone please tell me why? echo... (7 Replies)
Discussion started by: Sniper Pixie
7 Replies

2. Shell Programming and Scripting

Help with if loop (string comparison)

Hi Can someone please tell me what is wrong with this (ksh).. if + ]] then echo ${COMP_TEMP} fi What i need here is, say if the variable is a 1 or 2 digit number, then execute the if loop. Basically the variable can either be 1-30 or some other character sequence say '?', '&&'... (4 Replies)
Discussion started by: psynaps3
4 Replies

3. Shell Programming and Scripting

Sed appending string using for loop?

Hi All, I have been trying to format a file using sed. I can't seem to get the syntax right. I want to append the string from file1.txt to file1.csv with the final output file being file2.csv, but before the string is appended to the end of each line, first insert a comma. Here is the sed... (2 Replies)
Discussion started by: cstovall
2 Replies

4. Shell Programming and Scripting

How to loop through every char in a string

for example this string: gLZMQp8i Loop become easy if we add space between each char, How to do it? or other solutions are welcome. (9 Replies)
Discussion started by: honglus
9 Replies

5. Shell Programming and Scripting

find a string in a loop

Hi, Can anyone help with the problem below? I need to read all text files (file1, file2, file3) in a loop and find file1.txt: file2.txt: File3.txt: (7 Replies)
Discussion started by: Lenora2009
7 Replies

6. Shell Programming and Scripting

String concatenation not working in a loop

Hi, First post, so I hope someone can help me with this weirdness :) I have a number files with some rows of information I want to extract, at the same time I want to add to a string some details from the file. I have found two different ways of looping over rows in a file, but one method... (5 Replies)
Discussion started by: LostInTheWoods
5 Replies

7. Shell Programming and Scripting

for loop ( string having spaces )

Dear All, i facing problem to use string having spaces in for loop.. file used for FOR LOOP command.txt rpm -t -v ttm -D -r RJLL -h YELP rpm -t -v ttm -D -r RJLL -h ERRT rpm -t -v ttm -D -r RJLL -h TYYE rpm -t -v ttm -D -r RJLL -h POOL CODE using for execute above command... (3 Replies)
Discussion started by: arvindng
3 Replies

8. Shell Programming and Scripting

Searching for a string using loop.

Hi i am very new to shell scripting. I have got stuck on a portion on my script. Problem : I have 30 logfiles inside /home/test directory. I need to find the string "@ended today" in all the 30 logfiles and print the name of the files which did not have this string. i need to this by... (3 Replies)
Discussion started by: Soma Das
3 Replies

9. UNIX for Dummies Questions & Answers

Loop with Perl (string search)

I am using a perl script to reverse and complement sequences if a string is found. The script works as expected as standalone but I would like to use it in my bash file. However, I am not getting my expected result. My test.txt file >Sample_72... (8 Replies)
Discussion started by: Xterra
8 Replies

10. Shell Programming and Scripting

How to call a string by string from a file to use in for loop?

Hi, I have a below sql query. select * from table where name in ('${name}); I have a requirement to automate this as here i need to pass the string value name from txt file. The text file contains the differnet special characters and i have some 200 names in the text file as follows. 3"... (3 Replies)
Discussion started by: Samah
3 Replies
MISC_CONV(3)							 Linux-PAM Manual						      MISC_CONV(3)

NAME
misc_conv - text based conversation function SYNOPSIS
#include <security/pam_misc.h> void misc_conv(int num_msg, const struct pam_message **msgm, struct pam_response **response, void *appdata_ptr); DESCRIPTION
The misc_conv function is part of libpam_misc and not of the standard libpam library. This function will prompt the user with the appropriate comments and obtain the appropriate inputs as directed by authentication modules. In addition to simply slotting into the appropriate pam_conv(3), this function provides some time-out facilities. The function exports five variables that can be used by an application programmer to limit the amount of time this conversation function will spend waiting for the user to type something. The five variabls are as follows: time_t pam_misc_conv_warn_time; This variable contains the time (as returned by time(2)) that the user should be first warned that the clock is ticking. By default it has the value 0, which indicates that no such warning will be given. The application may set its value to sometime in the future, but this should be done prior to passing control to the Linux-PAM library. const char *pam_misc_conv_warn_line; Used in conjuction with pam_misc_conv_warn_time, this variable is a pointer to the string that will be displayed when it becomes time to warn the user that the timeout is approaching. Its default value is a translated version of "...Time is running out...", but this can be changed by the application prior to passing control to Linux-PAM. time_t pam_misc_conv_die_time; This variable contains the time (as returned by time(2)) that the will time out. By default it has the value 0, which indicates that the conversation function will not timeout. The application may set its value to sometime in the future, but this should be done prior to passing control to the Linux-PAM library. const char *pam_misc_conv_die_line; Used in conjuction with pam_misc_conv_die_time, this variable is a pointer to the string that will be displayed when the conversation times out. Its default value is a translated version of "...Sorry, your time is up!", but this can be changed by the application prior to passing control to Linux-PAM. int pam_misc_conv_died; Following a return from the Linux-PAM libraray, the value of this variable indicates whether the conversation has timed out. A value of 1 indicates the time-out occurred. The following two function pointers are available for supporting binary prompts in the conversation function. They are optimized for the current incarnation of the libpamc library and are subject to change. int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p); This function pointer is initialized to NULL but can be filled with a function that provides machine-machine (hidden) message exchange. It is intended for use with hidden authentication protocols such as RSA or Diffie-Hellman key exchanges. (This is still under development.) int (*pam_binary_handler_free)(void *appdata, pamc_bp_t *delete_me); This function pointer is initialized to PAM_BP_RENEW(delete_me, 0, 0), but can be redefined as desired by the application. SEE ALSO
pam_conv(3), pam(7) STANDARDS
The misc_conv function is part of the libpam_misc Library and not defined in any standard. Linux-PAM Manual 06/04/2011 MISC_CONV(3)
All times are GMT -4. The time now is 05:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy