How can I find which version of Awk is installed? OpSystem is HPUX 11.x
I am getting an error when trying to use the keyword nextfile and I dont know why! (Well, I can only assume that I have am using a version of Awk that does not support nextfile. However, according to O'Reilly, nextfile is... (3 Replies)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Hi
I need to make some checks inside an awk statement, but cannot come up with the the syntax for several checks under one awk statement, for example:
grep -w ${bits} mydata | awk '{if ($3==1)&&($4==3)&&($5==1) print }'
awk: syntax error near line 1
awk: illegal statement near line 1
In... (3 Replies)
I have two files
file1
A 2 4 6 8
B 1 3 5 7
C 1 3 5 7
D 1 3 5 7
E 1 3 5 7
file2
C D E F G
H I J K L
I need to add field 1 of file1 to both field 2s of file2 and repeat the same on all the rows in... (2 Replies)
I have a txt file with two columns
Freq Loss
10 30
20 40
30 10
40 50
50 60i have used the below code to get the minimum value out of this array in second cloumn.
awk 'NR==N{min=$N;max=$N}NR>N{if ($N>max){max=$N};if ($N<min){min=$N}}END {print... (3 Replies)
Hello,
I have a bunch of xml file that needs to have edits made and I was wondering if a BASH script could handle it.
I would like the script to look within my xml files and replace all integers greater than 5px with a value that is 25% smaller. For example, 100px = 75px. Since the integers... (12 Replies)
Hi everyone,
I am trying to write a bash script which reads a data file and does some algebraic operations.
here is the structure of data.xml file that I have;
1 <data>
2 .
3 .
4 .
5 </data>
6 <data>
7 .
8 .
9 .
10</data>
etc.
Each data block contains same number of lines (say... (4 Replies)
Hi Guru's.
I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 :
awk '{ if ($5>80) && if ($5 != 100) print $0}
But getting error:
>bdf1|sed 's/%//g'|awk '{ if ($5>80) && if ($5 != 100) print $0}'
syntax error The source line is 1.
The error... (6 Replies)
Hello Everybody.
I am having trouble matching multiple strings within an instanza. I ONLY want it to print if it finds both strings within the range. Example input (newlines between groups inserted only for readibility):
Keywords to match are "artist" and "play count"
startgroup1
artist:... (5 Replies)
Hi All,
Do you have any sample script,
- auto get file from SFTP remote server and delete file in remove server after downloaded.
- only download specify filename
- auto upload file from local to SFTP remote server and delete local folder file after uploaded
- only upload specify filename
... (3 Replies)
Discussion started by: weesiong
3 Replies
LEARN ABOUT LINUX
projects
projects(1) User Commands projects(1)NAME
projects - print project membership of user
SYNOPSIS
projects [-dv] [ user]
projects -l [projectname [projectname...]]
DESCRIPTION
The projects command prints on standard output the projects to which the invoking user or an optionally specified user belongs. Each user
belongs to some set of projects specified in the project(4) file and possibly in the associated NIS maps and LDAP databases for project
information.
OPTIONS
The following options are supported:
-d Prints only default project.
-l Prints verbose info on each project projectname. If no projectnames are given, info on all projects is printed.
-v Prints project descriptions along with project names.
OPERANDS
The following operand is supported:
projectnaDisplay information for the specified project.
user Displays project memberships for the specified user.
EXAMPLES
Example 1: Displaying Membership for a Specified User
example$ projects paul
default beatles wings
example$ projects ringo
default beatles
example$ projects -d paul
beatles
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 A fatal error occurred during execution.
2 Invalid command line options were specified.
FILES
/etc/project Local database containing valid project definitions for this machine.
ATTRIBUTES
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Stability |See below. |
+-----------------------------+-----------------------------+
The invocation is Evolving. The human-readable output is Unstable.
SEE ALSO getdefaultproj(3PROJECT), getprojent(3PROJECT), project(4), attributes(5)SunOS 5.10 13 May 2004 projects(1)