09-06-2007
cant get this to work
whoami | grep < $1 | echo $1
trying to write a script that finds out who the user is and then takes occurences of that username from a file that is passed as an argument and then displays it
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to check if files already exist in a directory. They have the same basename (exsyctr1), but 4 different extensions. If the files exist, then I make backups of them, then copy them from another directory ($livecomp/data) to the current one ($copycomp/data). If they don't exist, just... (5 Replies)
Discussion started by: Ypnos
5 Replies
2. UNIX for Advanced & Expert Users
can someone tell me the meaning of this commnad,
If you want to see a grand total of CPU time for a program when it finishes running, you can use the time command. At the Unix prompt, enter:
time java myprog
Replace myprog with the name of the program you are running. The following is an... (1 Reply)
Discussion started by: ldpathak
1 Replies
3. UNIX for Dummies Questions & Answers
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
4. UNIX for Advanced & Expert Users
1|foo|bar
2|usa|ll
3|usa|vg
4|usa|vg
5|bar|vg
6|usa|vg
7|usa|ll
8|uk|nn
9|foo|manu|bar
10|uk|bb
11|foo|mm
12|kuwait|jkj
13|kuwait|mm
14|dubai|hh
awk '/foo/,/bar/' test_file1----command run at the prompt
output should have been the first 3 lines......
1|foo|bar (1 Reply)
Discussion started by: bishweshwar
1 Replies
5. Linux
Can anyone explain how Graphic LCD (CSTN / STN) work in Unix...
From Graphic file thro driver code to display....?
Thanks (1 Reply)
Discussion started by: nat123
1 Replies
6. Linux
********nothing too see here!!!****** (2 Replies)
Discussion started by: TonyChapman
2 Replies
7. Shell Programming and Scripting
Hi falks,
I need to dispaly a list of only directories .
As it written in the manual ,the command to do it is 'ls -d'.
When i issue 'ls -d' i'm getting:
tornado.orca.ent:DB10g :/home/oracle/Create_Database > ls -d
.
Is anyone have any idea why id does not display directories ,or maybe... (11 Replies)
Discussion started by: nir_s
11 Replies
8. IP Networking
I have a client machine that was built and loaded with SCO UNIX 2.1.3, (yes it is old). The machine worked fine on the closed network that I tested on in my shop. I then had to change it to the network that it would be connected to. Below is the host file, router and subnet mask file that I usually... (0 Replies)
Discussion started by: NC user
0 Replies
9. Shell Programming and Scripting
My script work on Linux but not work in sun os.
my script.
logFiles="sentLog1.log sentLog2.log"
intial_time="0 0"
logLocation="/usr/local/tomcat/logs/"
sleepTime=600
failMessage=":: $(tput bold)Log not update$(tput rmso) = "
successMessage="OK"
arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies
10. IP Networking
hi all. and sorry for the random question, but this sparkled a raging flame-war at work and i want more points of view
situation
a router, with linux of some sort,
dhcp client requesting for ip in wan1 (as usual with wan ports)
dhcp server listening in lan1, and assigning ip (as usual... (9 Replies)
Discussion started by: broli
9 Replies
quota(1) General Commands Manual quota(1)
NAME
quota - displays disk usage and limits
SYNOPSIS
quota [-agGuUqv]
quota [-a] [-g] [groupname] [-qv]
quota [-a] [-G] [groupID] [-qv]
quota [-a] [-u] [username] [-qv]
quota [-a] [-U] [userID] [-qv]
OPTIONS
Displays quota information for all mounted file systems: those in the /etc/fstab file and those mounted manually or with automount. The -q
option takes precedence over the -a option. When specified without the groupname argument, displays group quotas for groups of which you
are a member. Displays group quotas for the group when you specify groupname. When specified without the groupID argument, displays group
quotas for groups of which you are a member. Displays group quotas for the group when you specify groupID. Displays only your user quotas
(the default) when specified without the username argument. Displays user quotas for the user when you specify username. Displays only
your user quotas (the default) when specified without the userID argument. Displays user quotas for the user when you specify userID.
Displays information only for file systems that have disk quotas and where usage is over quota. Takes precedence over the -v and -a
options. Displays quota information for all mounted file systems that are specified in the /etc/fstab file. Quota information is dis-
played for each file system whether or not quotas are enabled for it. The -q option takes precedence over the -v option.
DESCRIPTION
The quota command displays disk space usage and limits. Disk quotas are displayed as 1 kilobyte blocks.
By default, only your user quotas are displayed. If you use the -g or the -G option without an argument, the quota command displays group
quotas for groups of which you are a member.
Unless you use the -v option, the quota command reports only on file systems listed in /etc/fstab that have disk quotas and under which you
have files. If quota exits with a status of 1, one or more file systems are over quota. If quota exits with a status of 2, there are sys-
tem errors.
NOTES
The term file system represents either a UFS file system or an AdvFS fileset.
Do not use both a user and a group option in the same command.
RESTRICTIONS
You must be the root user to use the optional username or userID argument to view information about another user, or to use the optional
groupname or groupID argument to view information about a group to which you do not belong.
FILES
Contains user quotas for each file system. Contains group quotas for each file system. Contains file system names and locations.
SEE ALSO
edquota(8), quot(8), quotacheck(8), quotaon(8), quotaoff(8), repquota(8), quotactl(2), fstab(4)
quota(1)