06-19-2006
Mr. Bourne,
Why you are posting in this thread? This thread has no relevance to your problem. Same problem you have posted in another thread. Pls don't do like that and carefully read the rules before posting any further queuries.
Regards,
Tayyab
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies
2. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
3. UNIX for Dummies Questions & Answers
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies
4. Shell Programming and Scripting
input1
a_a a/a 10 100
a1 a_a 20 200
b1 b_b 30 300
input2
a_a a/a xxx yyy
a1 a1 lll ppp
b1 b_b kkk ooo
output
a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies
5. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
6. Shell Programming and Scripting
Hi,
I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files.
To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Discussion started by: anandek
10 Replies
7. Shell Programming and Scripting
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies
8. Shell Programming and Scripting
Hi,
I am trying to pass awk field to a command line executed within awk (need to convert a timestamp into formatted date).
All my attempts failed this far.
Here's an example.
It works fine with timestamp hard-codded into the command
echo "1381653229 something" |awk 'BEGIN{cmd="date -d... (4 Replies)
Discussion started by: tuxer
4 Replies
LEARN ABOUT OPENDARWIN
chgrp
CHGRP(1) BSD General Commands Manual CHGRP(1)
NAME
chgrp -- change group
SYNOPSIS
chgrp [-fhv] [-R [-H | -L | -P]] group file ...
DESCRIPTION
The chgrp utility sets the group ID of the file named by each file operand to the group ID specified by the group operand.
The following options are available:
-H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal
are not followed).
-L If the -R option is specified, all symbolic links are followed.
-P If the -R option is specified, no symbolic links are followed. This is the default.
-R Change the group ID for the file hierarchies rooted in the files instead of just the files themselves.
-f The force option ignores errors, except for usage errors and doesn't query about strange modes (unless the user does not have proper
permissions).
-h If the file is a symbolic link, the group ID of the link itself is changed rather than the file that is pointed to.
-v Cause chgrp to be verbose, showing files as the group is modified.
The -H, -L and -P options are ignored unless the -R option is specified. In addition, these options override each other and the command's
actions are determined by the last one specified.
The group operand can be either a group name from the group database, or a numeric group ID. If a group name is also a numeric group ID, the
operand is used as a group name.
The user invoking chgrp must belong to the specified group and be the owner of the file, or be the super-user.
DIAGNOSTICS
The chgrp utility exits 0 on success, and >0 if an error occurs.
COMPATIBILITY
In previous versions of this system, symbolic links did not have groups.
The -v option is non-standard and its use in scripts is not recommended.
FILES
/etc/group group ID file
SEE ALSO
chown(2), fts(3), group(5), passwd(5), symlink(7), chown(8)
STANDARDS
The chgrp utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
March 31, 1994 BSD