Sponsored Content
Top Forums Shell Programming and Scripting Limit ouput file on a shell script Post 302431271 by pointer on Monday 21st of June 2010 09:38:40 AM
Old 06-21-2010
rolling Log file

Just keeping last 10 MB.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is there a limit to the no. of arguments to a shell script ?

What is the maximum no. of arguments that could be passed to a shell script ? Is there any restriction ? I've a requirement where I need to pass a list of names to a unix script and I guess the number of such names is not a fixed one. It can run into hundreds. Is this feasible ? (4 Replies)
Discussion started by: hidnana
4 Replies

2. Shell Programming and Scripting

script to eliminate left and right fields and to get the ouput.

Hi Experts, I have a file as given below and want to filter out the filenames in it , by deleting left and right filds and to have the fllenames (There are spaces in the filename), Sun Jan 11 11:20:10 2009 1 0 /home/output/file2311_recent.list user1 user2 0 done Sun Jan 11 11:20:10 2009 1 0... (10 Replies)
Discussion started by: rveri
10 Replies

3. Shell Programming and Scripting

View ouput as a file

Hi all , I have a view in teradata , the ouput of that view have to be stored as a file with delimitere as '|'.Is there any possibility of doing this in unix ? Thanks in advance , Vinoth (6 Replies)
Discussion started by: vino.paal
6 Replies

4. Shell Programming and Scripting

csh shell script 'set' argument limit?

Hi , I have a script that is causing a problem that led me to think if there is a limit to the number of arguments for 'set' command in csh shell script. Here is my script: #!/bin/csh -f set top = design_top #1 set v_mbist = ( sim_mbist/*.v ) #2 set v_simlist = ( -v... (2 Replies)
Discussion started by: return_user
2 Replies

5. Shell Programming and Scripting

How to remove a file in shell script if its size exceeds limit?

How can i remove a file using shell script when its size exceeds 10MB. Given that file is located in different location to the shell script where it is running? (4 Replies)
Discussion started by: vel4ever
4 Replies

6. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

7. UNIX for Dummies Questions & Answers

Wget ouput to log file

Hi all The following code will update the Dynamic DNS server at Namecheap.com. wget -O 'https://dynamicdns.park-your-domain.com/update?host=www&domain=example.com&password=your DDNS password'Would like to append the output to a log file using >> /path/path/logfile at the end of the command. ... (7 Replies)
Discussion started by: CRChamberlain
7 Replies

8. Shell Programming and Scripting

Inserting ouput into a file using redirection

Hallo Team, I would like to redirect an output from a file into another file. Here are the two commands/files. -bash-3.2$ cat lack.csv lemontwistpax -bash-3.2$ ll -ltr BW*|tail -1 -rw-r--r-- 1 mind mind 1844 Sep 25 12:06... (8 Replies)
Discussion started by: kekanap
8 Replies

9. Shell Programming and Scripting

Shell Script has different ouput via cron vs when run Manually

Hello Lads, I deployed a script on my mac to start and stop EC2 instances on AWS console. The script when started manually on the terminal does the expected stop and start. Problem is when i try to schedule it on a cron, it fails to recognize the AWS Keys which i set up as ENV variable by... (2 Replies)
Discussion started by: Irishboy24
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script ouput conversion

Hi All, I am trying to print all the packages info in solaris 11 using below script. #!/usr/bin/env bash pkginfo -l | egrep '(BASEDIR|NAME|VERSION)' | awk '{print}' > /tmp/cp1 /usr/bin/nawk -F: ' {for (i=1; i<=NF; i++) {gsub (/^ *| *$/, "", $i) ... (5 Replies)
Discussion started by: sravani25
5 Replies
UTRACE_CONTROL(9)						  utrace core API						 UTRACE_CONTROL(9)

NAME
utrace_control - control a thread being traced by a tracing engine SYNOPSIS
int utrace_control(struct task_struct * target, struct utrace_engine * engine, enum utrace_resume_action action); ARGUMENTS
target thread to affect engine attached engine to affect action enum utrace_resume_action for thread to do DESCRIPTION
This is how a tracing engine asks a traced thread to do something. This call is controlled by the action argument, which has the same meaning as the enum utrace_resume_action value returned by event reporting callbacks. If target is already dead (target->exit_state nonzero), all actions except UTRACE_DETACH fail with -ESRCH. The following sections describe each option for the action argument. UTRACE_DETACH After this, the engine data structure is no longer accessible, and the thread might be reaped. The thread will start running again if it was stopped and no longer has any attached engines that want it stopped. If the report_reap callback may already have begun, this fails with -ESRCH. If the report_death callback may already have begun, this fails with -EALREADY. If target is not already stopped, then a callback to this engine might be in progress or about to start on another CPU. If so, then this returns -EINPROGRESS; the detach happens as soon as the pending callback is finished. To synchronize after an -EINPROGRESS return, see utrace_barrier. If target is properly stopped before utrace_control is called, then after successful return it's guaranteed that no more callbacks to the engine->ops vector will be made. The only exception is SIGKILL (and exec or group-exit by another thread in the group), which can cause asynchronous report_death and/or report_reap callbacks even when UTRACE_STOP was used. (In that event, this fails with -ESRCH or -EALREADY, see above.) UTRACE_STOP This asks that target stop running. This returns 0 only if target is already stopped, either for tracing or for job control. Then target will remain stopped until another utrace_control call is made on engine; target can be woken only by SIGKILL (or equivalent, such as exec or termination by another thread in the same thread group). This returns -EINPROGRESS if target is not already stopped. Then the effect is like UTRACE_REPORT. A report_quiesce or report_signal callback will be made soon. Your callback can then return UTRACE_STOP to keep target stopped. This does not interrupt system calls in progress, including ones that sleep for a long time. For that, use UTRACE_INTERRUPT. To interrupt system calls and then keep target stopped, your report_signal callback can return UTRACE_STOP. UTRACE_RESUME Just let target continue running normally, reversing the effect of a previous UTRACE_STOP. If another engine is keeping target stopped, then it remains stopped until all engines let it resume. If target was not stopped, this has no effect. UTRACE_REPORT This is like UTRACE_RESUME, but also ensures that there will be a report_quiesce or report_signal callback made soon. If target had been stopped, then there will be a callback before it resumes running normally. If another engine is keeping target stopped, then there might be no callbacks until all engines let it resume. Since this is meaningless unless report_quiesce callbacks will be made, it returns -EINVAL if engine lacks UTRACE_EVENT(QUIESCE). UTRACE_INTERRUPT This is like UTRACE_REPORT, but ensures that target will make a report_signal callback before it resumes or delivers signals. If target was in a system call or about to enter one, work in progress will be interrupted as if by SIGSTOP. If another engine is keeping target stopped, then there might be no callbacks until all engines let it resume. This gives engine an opportunity to introduce a forced signal disposition via its report_signal callback. UTRACE_SINGLESTEP It's invalid to use this unless arch_has_single_step returned true. This is like UTRACE_RESUME, but resumes for one user instruction only. It's invalid to use this in utrace_control unless target had been stopped by engine previously. Note that passing UTRACE_SINGLESTEP or UTRACE_BLOCKSTEP to utrace_control or returning it from an event callback alone does not necessarily ensure that stepping will be enabled. If there are more callbacks made to any engine before returning to user mode, then the resume action is chosen only by the last set of callbacks. To be sure, enable UTRACE_EVENT(QUIESCE) and look for the report_quiesce callback with a zero event mask, or the report_signal callback with UTRACE_SIGNAL_REPORT. Since this is not robust unless report_quiesce callbacks will be made, it returns -EINVAL if engine lacks UTRACE_EVENT(QUIESCE). UTRACE_BLOCKSTEP It's invalid to use this unless arch_has_block_step returned true. This is like UTRACE_SINGLESTEP, but resumes for one whole basic block of user instructions. Since this is not robust unless report_quiesce callbacks will be made, it returns -EINVAL if engine lacks UTRACE_EVENT(QUIESCE). UTRACE_BLOCKSTEP devolves to UTRACE_SINGLESTEP when another tracing engine is using UTRACE_SINGLESTEP at the same time. Kernel Hackers Manual 2.6. July 2010 UTRACE_CONTROL(9)
All times are GMT -4. The time now is 03:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy