Hi everyone!
Easy question for everyone. I'm trying to run a command line to find an exact match of a decimal number within a file. The number can be a positive OR negative number.
I need to calculate the biggest number in array size n.
Example: Users enter: 1 7 4 9
The biggest number is : 9
Simple but I'm really new on this on Shell/Bash! Anything will be helpful! Thanks!
Introduction
When you are running out of disk space, you need to concentrate on the biggest files and folders on your disk, so you can get space quickly.
The best way, is to list the first 10 folders, then go inside some of them, and find files you may or can delete, and get new free space.
Commands needed
There is not a single command in Linux to help us with this task, but we will use du, sort
Words 29 weeks 3 days ago I have a file with words, some of them repeats. I need to write one liner that shows me the first 5 words with the biggest number of aparition, and will show me like this: number of aparitions space word. Any ideea?
I have a text file, inside of this file is a number, and I have a script.sh in ksh.
The script reads the file and gets the number, then increases the number by 1 and overwrites the new number in the file, then sleeps for some time and the process repeats until the number is equal to 120.
I want to have this script running n times at the same time, how do I do this?
But then I will have n process
I would like to check how many file descriptors are actually used:
cat /proc/sys/fs/file-nr
12750 0 753795
The first column (12750) indicates the number of file descriptors allocated since boot.
I would like to know why the number from the following command is different (assuming this one liner is returning the correct value:
for pid in $(lsof | awk '{ print $2 }' | uniq); do find /pr
Hi,
I have a file with more than 1 million records.. Each row has a distance number.. I want to know how many times is each number occurring from min to max number..
Code:
2
5
120
208
7
28
45
6
33
120
7
208
so onn..
output
0-0
1-0
2-1
3-0
4-0
5-1
6-1
7-2
so on 208-2
Thanks,
Hey fellas,
I wrote an script which its output is like this:
Code:
a 1 T
a 1 T
a 2 A
b 5 G
b 5 G
b 5 G
I wanna print $1 $2 and the total number of $2 value as the third column and after that $3. Sth like this:
Code:
a 1 2 T
a 2 1 A
b 5 3 G
I know how to do it with a given input file but cannot do it using pipe.
Hey all,
I am trying to print the number of updates available and print it with conky, but I am having a hard time finding out the best way to do this. I would like a number between 0 and N, inclusive.
My first thought was to run: