Sponsored Content
Top Forums Shell Programming and Scripting Calling shell script within awk script throws error Post 302801117 by Sudhakar333 on Wednesday 1st of May 2013 10:59:27 AM
Old 05-01-2013
Thanks for the input. The syntax issue is solved. However I don't see any data being passed in the parameter and it always seems to be empty. Any idea ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling dos2unix on shell script from within the script

I have a build script. It was created on Linux. For some reason, I got it to windows and modified it. And brought it back again to Linux. Since there is the question of the ^M chars appearing, the way out is to do a dos2unix on the script file. This is done manually. Is there a way to call... (4 Replies)
Discussion started by: vino
4 Replies

2. Shell Programming and Scripting

How to return the value from the called shell script to the calling sh script

Hi all, I have two ksh scripts #sample1.sh #!/bin/ksh . ./sample2.sh echo $fileExist #sample2.sh #!/bin/ksh func() { i=1 return $a } func echo $? Here how should I return the value of sample2.sh back to sample1.sh? Thanks in advance. (2 Replies)
Discussion started by: gp_singh
2 Replies

3. Shell Programming and Scripting

Error when calling sybase stored proc from shell script

Hi, I am writing a script that needs to call a stored proc which would update a column in a table based on a condition. I need to also capture the number of rows updated. However, When I execute the script I keep getting this error: ./test_isql.sh: syntax error at line 33: `end of file'... (3 Replies)
Discussion started by: karthikk
3 Replies

4. Shell Programming and Scripting

Syntax error calling TCL script from shell script

hello everyone i am beginner on shell scripting .and i am working on my project work on ad hoc network i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem " syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies

5. Shell Programming and Scripting

Error in calling a shell script from another script

HI, We are using two shell scripts, script.sh,env.sh, where env.sh will be called inside script.sh. The variable inside env.sh is used as $var in script.sh.But while running the script its not identifying that variable. Is there any permission needed to call a script inside another script. ... (3 Replies)
Discussion started by: banupriyat
3 Replies

6. Shell Programming and Scripting

How we can pass the argument when calling shell script from perl script

Can someone let me know how could I achieve this In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies

7. Shell Programming and Scripting

calling a shell script present on another server using perl script.

Hi, I am working on a sever A. I want to write a perl script to execute a shell script persent on the server B. please help me in this. thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies

8. Shell Programming and Scripting

awk script throws invalid char expression

Hello there, I am new to the awk scripting and getting the following error while running the script. Please can you advise me how to resolve this . Thanks ./sub_del_awk_lat.sh awk: cmd. line:5: warning: escape sequence `\/' treated as plain `/' awk: cmd. line:5: sed -n... (6 Replies)
Discussion started by: Sudhakar333
6 Replies

9. UNIX for Dummies Questions & Answers

Calling Shell script Error

Hi All, I need to call a script in another server(Say B).So I logged in my local Machine(say A)using putty and given these command ssh root@hostname cd home\oracle sh script.sh. This is working perfectly.But when I have those command in a shell script and placed in my local... (2 Replies)
Discussion started by: Nivas
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script file check throws [: too many arguments

While I am trying to check the filename/s in IF statement of a shell script (RedHat Linux 6) I am getting below error: File check: filename_time2=`date --date='yesterday' +%Y-%m-%d` cd /location/of/the/files/to/copy if then cp server.log-$filename_time2* ../archive/new... (5 Replies)
Discussion started by: Dip
5 Replies
quota(2)							System Calls Manual							  quota(2)

Name
       quota - manipulate disk quotas

Syntax
       #include <sys/types.h>
       #include <sys/param.h>
       #include <sys/quota.h>

       quota(cmd, uid, arg, addr)
       int cmd, uid, arg;
       caddr_t addr;

Description
       The  call manipulates disk quotas for file systems that have had quotas enabled with The cmd parameter indicates a command in the following
       list that is applied to the user ID uid.  The arg parameter is a command specific argument and addr is the address of an optional,  command
       specific  data  structure,  which  is copied in or out of the system.  The interpretation of arg and addr is given with each command in the
       list that follows:

       Q_SETDLIM
	      Set disk quota limits and current usage for the user with ID uid.  The arg parameter is a major-minor device indicating a particular
	      file  system.   The addr parameter is a pointer to a struct dqblk structure, defined in <sys/quota.h>.  Only the superuser can issue
	      this call.

       Q_GETDLIM
	      Get disk quota limits and current use for the user with ID uid.  The remaining parameters are identical  to  the	Q_SETDLIM  command
	      parameters.

       Q_SETDUSE
	      Set  disk  use limits for the user with ID uid.  The arg parameter is a major-minor device indicating a particular file system.  The
	      addr is a pointer to a struct dqusage structure, defined in <sys/quota.h>.  Only the superuser can issue this call.

       Q_SYNC Update the on-disk copy of quota uses.  The uid, arg, and addr parameters are ignored.

       Q_SETUID
	      Change the calling process's quota limits to those of the user with ID uid.  The arg and addr  parameters  are  ignored.	 Only  the
	      superuser can issue this call.

       Q_SETWARN
	      Alter  the disk usage warning limits for the user with ID uid.  The arg is a major-minor device indicating a particular file system.
	      The addr parameter is a pointer to a struct dqwarn structure, which is defined in <sys/quota.h>.	Only the superuse can  issue  this
	      call.

       Q_DOWARN
	      Warn  the user with user ID uid about excessive disk use.  This call causes the system to check its current disk use information and
	      print a message on the terminal of the caller for each file system on which the user is over quota.  If the arg parameter is  speci-
	      fied  as	NODEV,	all  file systems that have disk quotas are checked.  Otherwise, arg indicates a specific major-minor device to be
	      checked.	Only the superuser can issue this call.

Return Values
       A successful call returns 0 and, possibly, more information specific to the command specified in the cmd parameter; when an  error  occurs,
       the value -1 is returned and the global variable errno is set to indicate the reason.

Diagnostics
       A quota call fails when one of the following occurs:

       [EINVAL]       The kernel has not been compiled with the QUOTA option.

       [EINVAL]       The cmd parameter is invalid.

       [ESRCH]	      No disk quota is found for the indicated user.

       [EPERM]	      Only the superuser can issue the call and the caller is not the superuser.

       [ENODEV]       The arg parameter is being interpreted as a major-minor device, and it indicates an unmounted file system.

       [EFAULT]       An invalid addr parameter is supplied; the associated structure could not be copied in or out of the kernel.

       [EUSERS]       The quota table is full.

See Also
       "Disk Quotas in a UNIX Environment", ULTRIX Supplementary Documents, Volume 3:System Manager

																	  quota(2)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy