Sponsored Content
Top Forums Shell Programming and Scripting Csh/tcsh : Check the file existance and run the script Post 302887619 by Neo on Sunday 9th of February 2014 01:26:42 PM
Old 02-09-2014
That's all you have tried so far?

I think you should show more effort into trying different things.

That's your entire effort at this script (posting code with syntax errors - i.e. unmatched double quotes)?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

diff between tcsh and csh -f

Hello Am very new to linux/unix, workin in it since 10 days only. I had started with bash and now I need to work in tcsh. I have changed shell for my user profile using 'chsh' I use gedit for script writing. Now in the first line if I write #!/bin/tcsh i get d msg /home/usr/.cshrc: No such... (2 Replies)
Discussion started by: mahendrakamath
2 Replies

2. Shell Programming and Scripting

Unexpected end of file..with csh->tcsh

All; Thanks for reading. I'm having a heck of a time with this cshell script that fires off an hp temperature monitor and rotates logs. I keep getting '/opt/temperature/temp.sh: line 22: syntax error: unexpected end of file' when I try to 'sh /opt/temperature/temp.sh" it --script... (3 Replies)
Discussion started by: swjv
3 Replies

3. Shell Programming and Scripting

Differences between csh and tcsh

What are the differences between csh and tcsh shells ? In one of the shell scripts csh binary is a soft link to tcsh. (1 Reply)
Discussion started by: shafi2all
1 Replies

4. Shell Programming and Scripting

check the file existance

Hello, I have two files .. 1. inventory_i.txt 2. inventory_b.txt I want to check if these two files exists. If exists, then do the process, otherwise, quite... if ; then echo "exists" else echo " does not exists" fi The above logic is not working... It is always, displaying Does... (2 Replies)
Discussion started by: govindts
2 Replies

5. Shell Programming and Scripting

tcsh: not run script (if: Badly formed number)

Hello I have Linux Debian & tcsh shell. My mini script not run :(. Startup script displays a message: user@host:dir% ./test if: Badly formed number. script: #!/bin/tcsh -f #script check size files systems set x = `df -h /usr | tail -n1 | awk '{ print( $5 ); }'` set y = 60% if ($x... (5 Replies)
Discussion started by: moskovets
5 Replies

6. Shell Programming and Scripting

How to run a bash script in csh shell?

Hi how to execute a bash script in csh shell? Thanks (3 Replies)
Discussion started by: rubinovito
3 Replies

7. Shell Programming and Scripting

Scripting to check the size of file and it's existance.

Hi, I am totaly new to create a script . Please help. I have file name retrived from SAP table into a internal table . Like :- /home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CGM/l_pc_112138_01_0_01_00.cgm /home/td_8d02_int_data_IPC-L/ILLUSTRATIONS/CMP/l_pc_112138_01_0_01_00.cmp Objective... (1 Reply)
Discussion started by: amitkumar.b2
1 Replies

8. Shell Programming and Scripting

how to check existance of multiple directories

Hi, I would like to check whether all the directories exists or not. I tried the below but it gives some error. below is the excerpt from my original script 24 #Check if the required directories are exists 25 dirExists() { 26 27 if 28 then 29 echo "required... (1 Reply)
Discussion started by: lookinginfo
1 Replies

9. Shell Programming and Scripting

How to run a file in a csh script?

Hi, I have a csh script. I want to set some variables and execute some command from a file in that script. abc.csh echo "primary script" b setenv XXX ddd set XX make abc I want to execute the commands of "b" file from abc.csh. How can i do that. Please view this link: How to use... (3 Replies)
Discussion started by: vdhingra123
3 Replies

10. Shell Programming and Scripting

check for file existance and generate exit code amd move to another directory

Hi.. i have a file ABC_*.txt in source directory which will come evry 30 min and same file will be moved to working directory first time ...and will perform some operations then we archive ABC_*.txt ..this will run for 30 min to 45 min from 2nd time onwards requirement is ...i need to check... (3 Replies)
Discussion started by: dssyadav
3 Replies
ionice(1)						      General Commands Manual							 ionice(1)

NAME
ionice - get/set program io scheduling class and priority SYNOPSIS
ionice [[-c class] [-n classdata] [-t]] -p PID [PID]... ionice [-c class] [-n classdata] [-t] COMMAND [ARG]... DESCRIPTION
This program sets or gets the io scheduling class and priority for a program. If no arguments or just -p is given, ionice will query the current io scheduling class and priority for that process. As of this writing, a process can be in one of three scheduling classes: Idle A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority argument. Presently, this scheduling class is permitted for an ordinary user (since kernel 2.6.25). Best effort This is the effective scheduling class for any process that has not asked for a specific io priority. This class takes a priority argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round- robin fashion. Note that before kernel 2.6.26 a process that has not asked for an io priority formally uses "none" as scheduling class, but the io scheduler will treat such processes as if it were in the best effort class. The priority within the best effort class will be dynam- ically derived from the cpu nice level of the process: io_priority = (cpu_nice + 20) / 5. For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The io priority is derived from the cpu nice level of the process (same as before kernel 2.6.26). Real time The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window. This scheduling class is not permitted for an ordinary (i.e., non-root) user. OPTIONS
-c class The scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle. -n classdata The scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data. -p pid Pass in process PID(s) to view or change already running processes. If this argument is not given, ionice will run the listed pro- gram with the given parameters. -t Ignore failure to set requested priority. If COMMAND or PID(s) is specified, run it even in case it was not possible to set desired scheduling priority, what can happen due to insufficient privileges or old kernel version. EXAMPLES
# ionice -c 3 -p 89 Sets process with PID 89 as an idle io process. # ionice -c 2 -n 0 bash Runs 'bash' as a best-effort program with highest priority. # ionice -p 89 91 Prints the class and priority of the processes with PID 89 and 91. NOTES
Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ io scheduler. AUTHORS
Jens Axboe <jens@axboe.dk> AVAILABILITY
The ionice command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. ionice August 2005 ionice(1)
All times are GMT -4. The time now is 05:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy