Sponsored Content
Top Forums Shell Programming and Scripting how to get the similar function in while loop or for loop Post 23105 by trynew on Monday 17th of June 2002 11:09:24 AM
Old 06-17-2002
Thanks for your replay and implementation!!!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Menu function stuck in a loop?

I having problem when I call this cleanupmenu function within a script. It continuously loops and goes to selection * That wasn't a valid selection. I have to kill it everytime to stop it. What am I doing wrong. I use this function menu in several other scripts and I don't have this problem at... (2 Replies)
Discussion started by: darthur
2 Replies

2. Programming

__read_nocancel Function Causes Infinite Loop

Does anyone know what __read_nocancel does and why it would go into an infinite loop? What I have gathered in my searches is that it pertains to server code. Yet, I'm not running this application in server mode. NOTE: There are server functions in the shared object, but the specific code... (3 Replies)
Discussion started by: marcus121
3 Replies

3. Shell Programming and Scripting

call a function in for loop

Hi all, I am trying to call a function in for loop in the below format #!/bin/bash abc() { commands } for (( i=0; i<=10; i++ )) do abc done The error i am getting when trying to execute: syntax error: unexpected end of file canany one help me where i am going wrong?? (5 Replies)
Discussion started by: gsr_kashyap
5 Replies

4. Emergency UNIX and Linux Support

Function and LOOP

Hello, I need help : I've got configurations files in two differents directory. Each configuration files contains some information that I must have in order to send specific command. I do not know how to do it. I belive I need a loop in function but I can't make it work. Extension of... (4 Replies)
Discussion started by: Aswex
4 Replies

5. UNIX for Dummies Questions & Answers

while loop stops after a function...

my ksh script is not working... i wanna remove lines in file2.txt from file1.txt # cat file1.txt this is line one this is line two this is line three this is line four this is line five # cat file2.txt this is line two this is line three # cat my_script.ksh #!/bin/ksh i=1 y=1... (8 Replies)
Discussion started by: curtis911
8 Replies

6. Shell Programming and Scripting

Merging two columns from two files with similar names into a loop

I have two files like this: fileA.net A B C fileA.dat 1 2 3 and I want the output output_expected A 1 B 2 C 3 I know that the easier way is to do a paste fileA.net fileA.dat, but the problem is that I have 10,000 couple of files (fileB.net with fileB.dat; fileC.net with... (3 Replies)
Discussion started by: valente
3 Replies

7. Shell Programming and Scripting

If loop inside function not working.

check_deplver () { dir=/abc/def/ghi if ssh -o StrictHostKeychecking=no $1 "" 2> /dev/null then echo " output is " ssh -o StrictHostKeychecking=no $1 "ls -lrt $dir | grep -i abc" 2> /dev/null else echo " directory not presnt" fi } This is not working. But... (7 Replies)
Discussion started by: NarayanaPrakash
7 Replies

8. Shell Programming and Scripting

While loop hangs in function running in background

Hello Everyone, I am writing a shell script to fetch log files from remote servers within a time range. It copies log files to local server, grep for date and then compares the time stamp of each log entry with the once specified. Below is the code. # Get log and Parsing function ... (1 Reply)
Discussion started by: kanagalamurali
1 Replies

9. Shell Programming and Scripting

How to pass function parameter to do loop?

Hi All, I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter. Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Discussion started by: mysocks
5 Replies

10. Shell Programming and Scripting

Optimizing for loop with awk or anything similar and portable

The variable COUNTPRO contains: COUNTPRO='Error__posting__message__to__EMR__Queue=0 Error__parsing__ReceiptSummary=0 xinetd__=4327 HTTP__1_1__500___=0 START__=2164 Marshaller__exception__while__converting__to__Receipt__xml=0 MessagePublisher__is__not__configured__correctly=0... (9 Replies)
Discussion started by: SkySmart
9 Replies
SYSTEMD-READAHEAD-REPLAY.SERVICE(8)			 systemd-readahead-replay.service		       SYSTEMD-READAHEAD-REPLAY.SERVICE(8)

NAME
systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd- readahead - Disk read ahead logic SYNOPSIS
systemd-readahead-replay.service systemd-readahead-collect.service systemd-readahead-done.service systemd-readahead-done.timer /usr/lib/systemd/systemd-readahead/systemd-readahead [OPTIONS...] COMMAND [DIRECTORY | FILE] DESCRIPTION
systemd-readahead-collect.service is a service that collects disk usage patterns at boot time. systemd-readahead-replay.service is a service that replays this access data collected at the subsequent boot. Since disks tend to be magnitudes slower than RAM, this is intended to improve boot speeds by pre-loading early at boot all data on disk that is known to be read for the complete boot process. systemd-readahead-done.service is executed a short while after boot completed and signals systemd-readahead-collect.service to end data collection. On this signal, this service will then sort the collected disk accesses and store information about them in /.readahead. Normally, both systemd-readahead-collect.service and systemd-readahead-replay.service are activated at boot so that access patterns from the preceding boot are replayed and new data collected for the subsequent boot. However, on read-only media where the collected data cannot be stored, it might be a good idea to disable systemd-readahead-collect.service. On rotating media, when replaying disk accesses at early boot, systemd-readahead-replay.service will order read requests by their location on disk. On non-rotating media, they will be ordered by their original access timestamp. If the file system supports it, systemd-readahead-collect.service will also defragment and rearrange files on disk to optimize subsequent boot times. OPTIONS
systemd-readahead understands the following options: -h, --help Prints a short help text and exits. --max-files= Maximum number of files to read ahead. Only valid for thes collect command. --file-size-max= Maximum size of files in bytes to read ahead. Only valid for the collect and replay commands. --timeout= Maximum time in microseconds to spend collecting data. Only valid for the collect command. COMMANDS
The following commands are understood by systemd-readahead: collect [DIRECTORY] Collect read-ahead data on early boot. When terminating, it will write out a pack file to the indicated directory containing the read-ahead data. replay [DIRECTORY] Perform read-ahead on the specified directory tree. analyze [FILE] Dumps the content of the read-ahead pack file to the terminal. For each file, the output lists approximately how much will be read ahead by the replay command. SEE ALSO
systemd(1) systemd 208 SYSTEMD-READAHEAD-REPLAY.SERVICE(8)
All times are GMT -4. The time now is 10:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy