10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
What I know so far:
ls -A will list all files except those starting with a dot
ls -d will list all directories
ls -m will separate contents by commas
For getting crtimes use:
stat filename will give me the inode number
or
ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies
2. Shell Programming and Scripting
i'm using the following code to add the entire content of a file (/tmp/resources.txt) to the line directly below the line containing a pattern (wonderful) in the file mainfile.txt:
sed '/^wonderful/ r /tmp/resources.txt' mainfile.txt
the problem is, it adds the entire content of... (1 Reply)
Discussion started by: SkySmart
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I've got two files to match. File one:
a1 b c d e
a2 b c d e
a3 b c d e
a4 b c d e
and file 2
a1 1 2 3 4
a2 5 6 7 8
a3 9 10 11 12
a4 1 2 3 4
I need to match them by the first column and add the four columns of file 2 to the file 1 so that those added columns go as columns... (5 Replies)
Discussion started by: zajtat
5 Replies
4. Shell Programming and Scripting
Hello friends! I am working a Psychology/Neuro* project where I am sorting inline citations by category. The final step of the process has me a little stuck. I need to take citations from a text list and sort them in another text file.
Here is a file X example... (1 Reply)
Discussion started by: danbroz
1 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a command line that will display a sorted list of logged in users. Just display the username and no other... (5 Replies)
Discussion started by: kofine05
5 Replies
6. Shell Programming and Scripting
Hello,
I am looking to automate a task - which is updating an existing access control instruction of a server and making sure that the attributes defined in the instruction is in sorted order. The instructions will be of a specific syntax.
For example lets assume below listed is one of an... (6 Replies)
Discussion started by: sanjayroc
6 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I am trying to add a line (usually just a word) to some text files in a directory that are already sorted. I just don't want to run the sort command again because it can take a long time when the text or log files are really huge. I have a bashscript that will take in the 1st argument... (7 Replies)
Discussion started by: raptor25
7 Replies
8. Shell Programming and Scripting
I have two list....
One has 17m (yes that's million) records in it which relate to the path and file name of individual text files.
At the start of the pathname is a two character identifier identifying which category it belongs in as identified by a second file with the two character lookup... (10 Replies)
Discussion started by: Bashingaway
10 Replies
9. Shell Programming and Scripting
Hi,
i have to make a command in unix system which make a sorted list by cpu time (not %cpu ). If the application exists more than a time I would like to keep only one copy.
Could you help me please ???
P.s : I am trying --> ps aux --sort -%cpu | uniq
but I understand that is wrong (5 Replies)
Discussion started by: petros55
5 Replies
10. Shell Programming and Scripting
I'm trying to execute a single shell command that will give me a sorted list of all the users currently logged into the system, displaying the users name as it appears in /etc/passwd.
I've tried
awk -F: '{print $1}' /etc/passwd | xargs finger -s | cut -c11-28 | uniq
This list whoever does... (7 Replies)
Discussion started by: kungfuice
7 Replies