Sponsored Content
Top Forums Shell Programming and Scripting When does a shell read into memory? Post 21677 by LivinFree on Tuesday 21st of May 2002 09:11:18 AM
Old 05-21-2002
Quote:
You seem to be envisioning that ksh remembers the last line number read and somehow will resume with the line that follows. Instead ksh will be positioned on a byte number and will read the next byte. You could easily throw it into the middle of a line.
Which makes sense, as I have seen it do some wierd stuff when playing with this the other day...
One of the first things we noticed (I wish I could remember what script we were playing with, since it exhibited this behavior), is that I could have a valid command, like "echo hello", that after changing, would cause the script to error out, complaining:
./tmp.sh: beho: command not found
We tried to control which bytes it overwrote, but were unable to control it in any usable manner...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find memory leaks shell script ???

Hi all, Has anyone out there a shell script to detect memory leaks on unix machines? And if so what way did they go about it .? (5 Replies)
Discussion started by: nano2
5 Replies

2. Programming

shared memory read/write using threads

I am looking for C program source code. Could you please help me in finding the source code required mentioned below. program to create multiple threads (one master thread and rest worker threads) and using the threads write into and read from shared memory Restrictions: Only one thread... (2 Replies)
Discussion started by: kumars
2 Replies

3. 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

4. Programming

Urgent!!!! - Write/read to/from shared memory

I created a shared memory and attached it. I also created the appropriate semaphores to sync. my read/write operations. However I do not know how am I supposed to do so. Anyone has got any ideas? I want to write int the form of 1234:23:444:... where each number between : means something to the... (0 Replies)
Discussion started by: tyron
0 Replies

5. UNIX for Dummies Questions & Answers

Write/Read in Shared memory

I have created and attached a shared memory segment. However I do not know how am I supposed to write and read data from it. I want to save various different data on this segment such as process IDs and other. Do you know how am I supposed to write these and be able to read such data in the correct... (1 Reply)
Discussion started by: tyron
1 Replies

6. Programming

Linux read and write external memory.

Hi everyone. I asked once here and it went well, so I'm very happy with this community. I have a new question to ask. I would like to read&write specify memory of a process which is not the process I'm doing it from, nor a child nor a parent. So, I want to do a program similar to Cheat... (3 Replies)
Discussion started by: lilezek
3 Replies

7. Linux

Reserv memory for uid 0 / sshd+shell

Hi! Does someone know how to ensure that root user always will be able to login to a system? What I mean is when a server is out of RAM and swapping like hell; sshd may spawn a shell and login root user to save the day? (2 Replies)
Discussion started by: Esaia
2 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

Shell script for %computational memory & % non computational memory

Dear, How to calculate %computational memory and %non computational memory from AIX server. What command used to find out %computational memory and % non computational memory except topas. Regards Nowshath (1 Reply)
Discussion started by: Nowshath
1 Replies

10. Programming

Linux Shell Piping w/Shared Memory

So I am pretty new to the linux environment, and I am trying to create a shell that uses multiple pipes, and I read online that piping using shared memory space is more efficient than using regular piping. However, I have zero clue how to use shared memory space with pipes. Has anyone done this... (1 Reply)
Discussion started by: Greg_MC
1 Replies
break(1)							   User Commands							  break(1)

NAME
break, continue - shell built-in functions to escape from or advance within a controlling while, for, foreach, or until loop SYNOPSIS
sh break [n] continue [n] csh break continue ksh *break [n] *continue [n] DESCRIPTION
sh The break utility exits from the enclosing for or while loop, if any. If n is specified, break n levels. The continue utility resumes the next iteration of the enclosing for or while loop. If n is specified, resume at the n-th enclosing loop. csh The break utility resumes execution after the end of the nearest enclosing foreach or while loop. The remaining commands on the current line are executed. This allows multilevel breaks to be written as a list of break commands, all on one line. The continue utility continues execution of the next iteration of the nearest enclosing while or foreach loop. ksh The break utility exits from the enclosed for, while, until, or select loop, if any. If n is specified, then break n levels. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be exited. The continue utility resumes the next iteration of the enclosed for, while, until, or select loop. If n is specified then resume at the n- th enclosed loop. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be used. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words that follow a command preceded by ** that are in the format of a variable assignment are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign, and also that word splitting and file name genera- tion are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), exit(1), ksh(1), sh( 1), attributes(5) SunOS 5.10 17 Jul 2002 break(1)
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy