Sponsored Content
Top Forums Shell Programming and Scripting reading and reversing a string Post 302290930 by nikhilneela on Tuesday 24th of February 2009 10:00:14 AM
Old 02-24-2009
what does sed do????
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reversing and trim a String through SHELL script

All I want to reverse and trim a string using UNIX shell scripts.Iam using Bourne shells. Can you help me? Thanx in advance Regards Deepak (5 Replies)
Discussion started by: DeepakXavier
5 Replies

2. Shell Programming and Scripting

output string in reversing order

If I have string { I_love_shell_scripts} anyone knows how to have output {stpircs_llehs_evol_I} by using shell and perl ?I know in perl, there is reverse() funcation, but can it be done by not using reverse()? (3 Replies)
Discussion started by: ccp
3 Replies

3. Shell Programming and Scripting

reading a string characterwise

hi , I am trying to read two strings character by character using arrays but i couldn't do it pls.give a solution (2 Replies)
Discussion started by: akmtcs
2 Replies

4. Shell Programming and Scripting

reading a .dat file in to a string

i have folowing code. i dont want data in an array. i like to put my data file info (after filtering and converting to lower case) in to a string call "name". so it would look like this, name= ffjtgj345 thgkty3 456gfhf rhtfn4 ...... how do i do that? i dont want to read # or blank lines. ... (13 Replies)
Discussion started by: usustarr
13 Replies

5. UNIX for Dummies Questions & Answers

Reading one line from a multiline string

Hi , I have a string which is of multiple line,I have to split the string by reading one line in each iteration and keep it in a string.I am keeping all the file names in side as string returned by the ls command ,I am stocked at the point of spliting the string to segragate each file. ... (4 Replies)
Discussion started by: Deekay.p
4 Replies

6. UNIX for Dummies Questions & Answers

Newbie Alert:Reversing part of a string?

Hello all, Wondering if anyone can help me out. Trying to cut the names out of the /etc/passwd file so that they can be displayed first then last name. I cut them out and put them into variables but cant get them to display side by side after cutting. Anyone able to help a newbie? (1 Reply)
Discussion started by: losingit
1 Replies

7. Programming

Some error with number of keyboard inputs occured with this code for reversing a string..

i used a two-way linked list "node" for the code:: #include<stdio.h> #include<malloc.h> void insert(); void reverse(); struct node { char c; struct node *next; struct node *back; }*start=NULL; int main() { int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies

8. Shell Programming and Scripting

File Reading for a certain string and echo the line before

Hi Guys, I have a big file like this. It has cache group line ( the bold lines ) and then followed by 10 status lines showing either Compelte or Failed. This pattern repeats several time. We can assume all the status lines have either Complete or Failed status for that Cache Group line. I... (13 Replies)
Discussion started by: MKNENI
13 Replies

9. Shell Programming and Scripting

Reading XML and replacing a string

Hi All, My thanks in advance for you guys reading this and for any posts. I'm having 100 XML files, I need script which replace a specific string. It must be incrementing in 100 xml files.. Sample XML files: <hwIPHostName type="attrib">DEMO1</hwIPHostName> I need Demo1 to be... (4 Replies)
Discussion started by: karty2129
4 Replies

10. UNIX for Dummies Questions & Answers

Reading between a repeated string

I have a requirement where I have to read the lines between a repeated string FileName: abc.txt ls /data/abc.txt 1 2 #ZENCO 3 4 5 6 #ZENCO 11 213 454 7 #ZENCO (8 Replies)
Discussion started by: eskay
8 Replies
Tcl_GetOpenFile(3)					      Tcl Library Procedures						Tcl_GetOpenFile(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_GetOpenFile - Get a standard IO File * handle from a channel. (Unix only) SYNOPSIS
#include <tcl.h> int Tcl_GetOpenFile(interp, string, write, checkUsage, filePtr) ARGUMENTS
Tcl_Interp *interp (in) Tcl interpreter from which file handle is to be obtained. CONST char *string (in) String identifying channel, such as stdin or file4. int write (in) Non-zero means the file will be used for writing, zero means it will be used for reading. int checkUsage (in) If non-zero, then an error will be generated if the file wasn't opened for the access indicated by write. ClientData *filePtr (out) Points to word in which to store pointer to FILE structure for the file given by string. _________________________________________________________________ DESCRIPTION
Tcl_GetOpenFile takes as argument a file identifier of the form returned by the open command and returns at *filePtr a pointer to the FILE structure for the file. The write argument indicates whether the FILE pointer will be used for reading or writing. In some cases, such as a channel that connects to a pipeline of subprocesses, different FILE pointers will be returned for reading and writing. Tcl_GetOpenFile normally returns TCL_OK. If an error occurs in Tcl_GetOpenFile (e.g. string didn't make any sense or checkUsage was set and the file wasn't opened for the access specified by write) then TCL_ERROR is returned and the interpreter's result will contain an error message. In the current implementation checkUsage is ignored and consistency checks are always performed. | Note that this interface is only supported on the Unix platform. KEYWORDS
channel, file handle, permissions, pipeline, read, write Tcl 8.0 Tcl_GetOpenFile(3)
All times are GMT -4. The time now is 02:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy