10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
So I'm trying to search for the top 10 or 15 items under a directory by file type. I want to run a command on a directory and get something like the following:
Example of expected output.. .PDF: 100, .txt: 95, .word: 80..
What would be the best way of going about this? I've searched around... (2 Replies)
Discussion started by: shackle101
2. Shell Programming and Scripting
I have a log file which have a date and time at the start of every line.
I need to search the log file starting from a specific time to the end of file.
Starting point: July 29 2018 21:00:00
End point : end of file
My concern is what if the pattern of `July 29 2018 21:00:00`... (3 Replies)
Discussion started by: erin00
3. Shell Programming and Scripting
I am trying to write a script that cycles through a folder containing many folders and when inside each one it's supposed to copy all the .fna.gz files to a folder elsewhere if the file and the respective folder have the same name.
for fldr in /home/playground/genomes/* ; do
find .... (8 Replies)
Discussion started by: Mr_Keystrokes
4. UNIX for Beginners Questions & Answers
First post, don't know much about Linux/Unix, but I need some help. Normally, I do grep 'what I'm searching for' FILE > file.txt so I can pull data from one file, and put it into a new one. The issue I am having is with specific dates, since the date field is 4, and it appears... (3 Replies)
Discussion started by: DennisG34
5. Shell Programming and Scripting
I need to do a grep in a specific file inside multiple (tar.gz) archives.
I know zgrep can grep in an archive, but as far as I know, I can't supply a specific filename from inside the archive to grep in.
Is there any other way do to this, besides extracting it and then... (1 Reply)
Discussion started by: Subbeh
6. UNIX for Advanced & Expert Users
Can I please have some ideas on how to do a recursive grep with certain types of files? The file types I want to use are *.c and *.java.
I know this normally works with all files.
grep -riI 'scanner' /home/bob/ 2>/dev/null
Just not sure how to get it to work *.c and *.java files. (5 Replies)
Discussion started by: cokedude
7. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Hey there, I'm brand new to using Unix as I just started a course on it in my University, and I currently working through a worksheet which focuses on the many commands and methods of GREP (I'm working through the terminal command... (11 Replies)
Discussion started by: SilvarHawke
8. UNIX for Dummies Questions & Answers
Iam new to unix and i have 1 requirement, can anyone help me please
I have provided the file below, i will be having similar files in 100+clients systems. i want to check the the ip address "192.168.208.40" and if it is present then i should get a mail alert, if the ip address is not... (1 Reply)
Discussion started by: tbd
9. Shell Programming and Scripting
I would like to search for a specific string at a specific line in a file and would like to know the count of it.
ABC 1234 BELL
HNZ 4567 RING
NNN 5673 BELL
Please help with the command to find the count of BELL in the above file samp.txt at the specific line 10 with... (7 Replies)
Discussion started by: techmoris
10. Shell Programming and Scripting
how can we search for a word (with case ignore )on specific line numbers
Awk /^regEX/ with condition on first line or second line
Awk/^ regex1/ on line 1
Awk /^regEX2/ on line 3
thanks in advance (4 Replies)
Discussion started by: rider29