Sponsored Content
Top Forums Shell Programming and Scripting read into a range of character Post 302570991 by ahamed101 on Saturday 5th of November 2011 07:55:41 AM
Old 11-05-2011
I didn't quite understand your requirement! Can you illustrate with an example?... The input string and expected output...

--ahamed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

read a variable character by character, substitute characters with something else

im having trouble doing this: i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's? im guessing its like getting the 1's compliment of the string im doing this in... (2 Replies)
Discussion started by: vipervenom25
2 Replies

2. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

3. Shell Programming and Scripting

need help in expanding hexa decimal character range

Hi all, I have a input like this 3AF9:3B01 and need to expand to the below output 3AF9 3AFA 3AFB 3AFC 3AFD 3AFE 3AFF 3B00 3B01 Please let me know the easiest way for achieving this. Thanks for the help in advance... (6 Replies)
Discussion started by: leo.maveriick
6 Replies

4. Shell Programming and Scripting

read the text file and print the content character by character..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... without using... (1 Reply)
Discussion started by: samupnl
1 Replies

5. UNIX for Dummies Questions & Answers

Use of character range in awk

Hi all, I am having a bit of a hard time using awk. I must do something wrong, but I don't know what... Any help would be greatly appreciated! I read a file, as follows :... ATOM 21 C THR A 4 23.721 -26.194 1.909 1.00 32.07 C ATOM 22 O THR A 4 ... (2 Replies)
Discussion started by: hypsis
2 Replies

6. UNIX for Advanced & Expert Users

Finding a specific range of character in file

hi, I want to store from 102 character to 128 character to a variable of header record which can be identified as 'HDR' which is the first 3 characters in the same line of a same.txt file. Please advise. Thanks (4 Replies)
Discussion started by: techmoris
4 Replies

7. Shell Programming and Scripting

Replacing character "|" in given character range

Hi I am having file : 1|2443094 |FUNG SIU TO |CLEMENT 2|2443095 |FUNG KIL FO |REMENT This file contains only 3 fields delimeted by "|". Last field is a decsription filed and it contains character "|". Due to this my output if breaking in 4 fields. I... (7 Replies)
Discussion started by: krsnadasa
7 Replies

8. Shell Programming and Scripting

Read character by character in line in which space is also included

Hi friend, I have one file , and i want to read that file character by character. I need this script in ksh. while using read option with -n1 am getting error. while read -n1 c read has bad option And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies

9. Shell Programming and Scripting

Grep - build character range with octal or hexa representation

Hello I would like to make a character range like that : echo "ABCDEF+1234" | grep -E ''or echo "ABCDEF+1234" | grep -E ''or echo "ABCDEF+1234" | grep -E ''Which should works on linux with english language And works also on linux with french language ( english install and after add french )... (4 Replies)
Discussion started by: jcdole
4 Replies

10. UNIX for Beginners Questions & Answers

Removing letters after a certain character within a range of columns

Hi there, I am trying to remove al letters after : character on specific columns from 10th column till 827. I used sed and cut to do so but I am sure there is better one liner someone can think of from unix community members. Huge file but it has this structure (Total number of Columns =... (10 Replies)
Discussion started by: daashti
10 Replies
KRB5_ACL_MATCH_FILE(3)					   BSD Library Functions Manual 				    KRB5_ACL_MATCH_FILE(3)

NAME
krb5_acl_match_file, krb5_acl_match_string -- ACL matching functions LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) SYNOPSIS
krb5_error_code krb5_acl_match_file(krb5_context context, const char *file, const char *format, ...); krb5_error_code krb5_acl_match_string(krb5_context context, const char *string, const char *format, ...); DESCRIPTION
krb5_acl_match_file matches ACL format against each line in a file. Lines starting with # are treated like comments and ignored. krb5_acl_match_string matches ACL format against a string. The ACL format has three format specifiers: s, f, and r. Each specifier will retrieve one argument from the variable arguments for either matching or storing data. The input string is split up using " " and " " as a delimiter; multiple " " and " " in a row are considered to be the same. s Matches a string using strcmp(3) (case sensitive). f Matches the string with fnmatch(3). The flags argument (the last argument) passed to the fnmatch function is 0. r Returns a copy of the string in the char ** passed in; the copy must be freed with free(3). There is no need to free(3) the string on error: the function will clean up and set the pointer to NULL. All unknown format specifiers cause an error. EXAMPLES
char *s; ret = krb5_acl_match_string(context, "foo", "s", "foo"); if (ret) krb5_errx(context, 1, "acl didn't match"); ret = krb5_acl_match_string(context, "foo foo baz/kaka", "ss", "foo", &s, "foo/*"); if (ret) { /* no need to free(s) on error */ assert(s == NULL); krb5_errx(context, 1, "acl didn't match"); } free(s); SEE ALSO
krb5(3) BSD
May 12, 2006 BSD
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy