And what should be the expected output given your sample data?
Considering your description, it should be something like this
(use gawk, nawk or /usr/xpg4/bin/awk on Solaris)
But given your sample data, it seems more like this:
Hi im new to unix and need to find a way to grep the top 5 numbers in a file and put them into another file. For example my file looks like this
abcdef 50000
abcdef 45000
abcdef 40000
abcdef 35000
abcdef 30000
abcdef 25000
abcdef 20000
abcdef 15000
abcdef 10000
and so on...
How can... (1 Reply)
I have a text file in the following format
....
START
1,1
2,1
3,1
..
..
9,1
10,1
END
....
I want to change to the output to
....
START
1,1
2,1
3,1
.. (4 Replies)
I am trying to add free and used memory (so that i can compute percentage used)of remote nodes using shell script. I use the openssh-server,expect tool and ssh script.
1)login.txt (info of nodes):
ip1|username|password
ip2|username|password
.
.
.
3)sshlogin.sh
#!/bin/bash ... (1 Reply)
Hello,
I have a column where there are values from 1 to 150.
I want to get the frequency of values in the following ranges:
1-5
6-10
11-15
....
....
....
146-150
How can I do this in a for loop?
Thanks,
Guss (1 Reply)
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)
I am trying to make a script to read marks from a file then find out how many of them are above 40 (passing marks). However my script is getting stuck at "read num". I dont understand whats the problem. Any help will be much appreciated.
#!/bin/bash
set -x
count=0; countP=0; PASSMK=40... (6 Replies)
Hi,
I'm trying to match a filename that could be called anything from vout001 to vout252 and was trying to do a small test but I'm not getting the result I thought I would..
Can some one tell me what I'm doing wrong?
*****@********>echo $mynumber ... (4 Replies)
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)
Hello,
I have the following script
while read id fraction
do
sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam
done < fraction.txt
where fraction.txt has two columns (id,fraction) and 50 rows
I am unable to run this as bash is not able to read the second... (2 Replies)
Discussion started by: nans
2 Replies
LEARN ABOUT OPENDARWIN
id
ID(1) BSD General Commands Manual ID(1)NAME
id -- return user identity
SYNOPSIS
id [user]
id -G [-n] [user]
id -P [user]
id -g [-nr] [user]
id -p [user]
id -u [-nr] [user]
DESCRIPTION
The id utility displays the user and group names and numeric IDs, of the calling process, to the standard output. If the real and effective
IDs are different, both are displayed, otherwise only the real ID is displayed.
If a user (login name or user ID) is specified, the user and group IDs of that user are displayed. In this case, the real and effective IDs
are assumed to be the same.
The options are as follows:
-G Display the different group IDs (effective, real and supplementary) as white-space separated numbers, in no particular order.
-P Display the id as a password file entry.
-g Display the effective group ID as a number.
-n Display the name of the user or group ID for the -G, -g and -u options instead of the number. If any of the ID numbers cannot be
mapped into names, the number will be displayed as usual.
-p Make the output human-readable. If the user name returned by getlogin(2) is different from the login name referenced by the user ID,
the name returned by getlogin(2) is displayed, preceded by the keyword ``login''. The user ID as a name is displayed, preceded by
the keyword ``uid''. If the effective user ID is different from the real user ID, the real user ID is displayed as a name, preceded
by the keyword ``euid''. If the effective group ID is different from the real group ID, the real group ID is displayed as a name,
preceded by the keyword ``rgid''. The list of groups to which the user belongs is then displayed as names, preceded by the keyword
``groups''. Each display is on a separate line.
-r Display the real ID for the -g and -u options instead of the effective ID.
-u Display the effective user ID as a number.
DIAGNOSTICS
The id utility exits 0 on success, and >0 if an error occurs.
SEE ALSO who(1)STANDARDS
The id function is expected to conform to IEEE Std 1003.2 (``POSIX.2'').
HISTORY
The historic groups(1) command is equivalent to ``id -Gn [user]''.
The historic whoami(1) command is equivalent to ``id -un''.
The id command appeared in 4.4BSD.
BSD June 6, 1993 BSD