06-21-2012
On Solaris use /usr/xpg4/bin/awk rather than awk
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have two files one (numbers file)contains the numbers(approximately 30000) and the other file(record file) contains the records(approximately 40000)which may or may not contain the numbers from that file.
I want to seperate the records which has the field 1=(any of the number from numbers... (15 Replies)
Discussion started by: Shiv@jad
15 Replies
2. Shell Programming and Scripting
I have a file with the following contents..say
123 abc 90and / 1009
from which i only need numbers to be printed.
like 123 90 1009
using any shell command.
Thanks. (7 Replies)
Discussion started by: vijay_0209
7 Replies
3. Shell Programming and Scripting
Howdy experts,
We have some ranges of number which belongs to particual group as below.
GroupNo StartRange EndRange
Group0125 935300 935399
Group2006 935400 935476
937430 937459
Group0324 935477 935549
... (6 Replies)
Discussion started by: thepurple
6 Replies
4. Shell Programming and Scripting
Help plz
Does any one have any idea how to compare interval ranges of 2 files.
finding 1-4 (1,2,3,4) of input2 in input1 of same key "a" values (5-10, 30-40, 45-60, 80-90, 100-120 ). Obviously 1-4 is not one of the range with in input1 a. so it should give out of range.
finding 30-33(31,32,33)... (1 Reply)
Discussion started by: repinementer
1 Replies
5. UNIX for Dummies Questions & Answers
hey,
I have a file with numbers in US notation (1,000,000.00) as well as european notation (1.000.000,00)
i want all the numbers to be in european notation.
the numbers are in a text file, so to prevent that the regex also changes the commas in a sentence/text i thought of:
sed 's/,/\./'... (2 Replies)
Discussion started by: FOBoy
2 Replies
6. Shell Programming and Scripting
Say I have 3 sets of numbers: 043 5326 90432
and I want to select the digits that all 3 have in common!
so to answer my question 3 is the only digit that all 3 have in common!
Can this be done with 1 command in unix shell? or is it more complicated than I think it is?
I don't want an answer... (3 Replies)
Discussion started by: puttster
3 Replies
7. Shell Programming and Scripting
Hello All,
I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns.
I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions.
If I... (11 Replies)
Discussion started by: Apfik
11 Replies
8. UNIX for Dummies Questions & Answers
##### (0 Replies)
Discussion started by: lucasvs
0 Replies
9. Shell Programming and Scripting
Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do.
I have a file which is formatted as... (4 Replies)
Discussion started by: crunchgargoyle
4 Replies
10. UNIX for Beginners Questions & Answers
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)
Discussion started by: echo manolis
7 Replies
LEARN ABOUT OPENSOLARIS
env
env(1) User Commands env(1)
NAME
env - set environment for command invocation
SYNOPSIS
/usr/bin/env [-i | -] [name=value]... [utility [arg... ]]
/usr/xpg4/bin/env [-i | -] [name=value]...
[utility [arg... ]]
DESCRIPTION
The env utility obtains the current environment, modifies it according to its arguments, then invokes the utility named by the utility op-
erand with the modified environment.
Optional arguments are passed to utility. If no utility operand is specified, the resulting environment is written to the standard output,
with one name=value pair per line.
/usr/bin
If env executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)).
/usr/xpg4/bin
If env executes commands with arguments, it uses /usr/xpg4/bin/sh (see ksh(1)).
OPTIONS
The following options are supported:
-i | - Ignores the environment that would otherwise be inherited from the current shell. Restricts the environment for utility to
that specified by the arguments.
OPERANDS
The following operands are supported:
name=value Arguments of the form name=value modify the execution environment, and are placed into the inherited environment before
utility is invoked.
utility The name of the utility to be invoked. If utility names any of the special shell built-in utilities, the results are unde-
fined.
arg A string to pass as an argument for the invoked utility.
EXAMPLES
Example 1 Invoking utilities with new PATH values
The following utility:
example% env -i PATH=/mybin mygrep xyz myfile
invokes the utility mygrep with a new PATH value as the only entry in its environment. In this case, PATH is used to locate mygrep, which
then must reside in /mybin.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of env: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
PATH Determine the location of the utility. If PATH is specified as a name=value operand to env, the value given shall be used in the
search for utility.
EXIT STATUS
If utility is invoked, the exit status of env is the exit status of utility. Otherwise, the env utility returns one of the following exit
values:
0 Successful completion.
1-125 An error occurred.
126 utility was found but could not be invoked.
127 utility could not be found.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
/usr/bin
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
/usr/xpg4/bin
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWxcu4 |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
ksh(1), sh(1), exec(2), profile(4), attributes(5), environ(5), standards(5)
SunOS 5.11 2 Jan 2002 env(1)