This is my first post so I am not sure how things go here. I'm sorry if I'm breaking the rule or something. Feel free to correct me about that
So as I was saying...
I'd been trying to grep this folder containing 900,000 txt files but seems no luck. I get either "No such file or directory" or "Argument list too long" error each time I tried.
Here is the 2 final commands I used (I'm trying to grab all lines containing "[" btw)
"
"
[I get too many "No such file or directory"]
"
"
[No errors for this but it didn't do what it suppose to, only got 1 file result in the end.]
If grep is really impossible to achieve this, I do not mind using "cat" to compile all txt into one and "grep" that one big chunk of txt file. I'd also tried that but I could never escaped from "No such file or directory" or "Argument list too long" error.
Hi,
does anybody knows about wc -l, how to transform it inot a just number?
this script ALWAYS executes the command3!!, However, the value of BMU_RUNNING is 1
case $BMU_RUNNING in
*0) command1
;;
*1) command 2;;
*)command 3;;
esac
The... (3 Replies)
I am trying to cat a file and then grep that file for a number. I can do it fine on other files but this particular file will not do anything. I tried running it on an older file from the same device but it is just not working. The file is nothing more than a flat file on a unix box. Here is just a... (3 Replies)
Hi All,
I'd like to do this
cat /etc/passwd
and grep -v on the /etc/shells list
I'd like to find all shell that doesn't exist on the /etc/passwd.
Is there an easy way without doing a egrep -v "/bin/sh|/bin/bash................"?
How do I use a file /etc/shells as my list for... (4 Replies)
I am not sure if using cat -n is the most efficient way to split a file into multiple files, one file per line in the source file.
I thought using cat -n would make it easy to process the file because it produces an output that numbers each line that I could then grep for with the regex "^ *$i".... (3 Replies)
Hi!
I would like to funnel a series of directories and subdirectories into a text file. This is the output I would like to see from a find command:
/mypath/ABC_01/VISIT_01
/mypath/ABC_01/VISIT_02
/mypath/ABC_01/VISIT_03
/mypath/ABC_02/VISIT_01
/mypath/ABC_03/VISIT_01
I've tried:
find... (2 Replies)
Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format. (3 Replies)
Hi
I'm new in the Shell world, and I've been trying the whole day to get my script to work.
I'm under Ubuntu 10.04.
Let me explain:
I want to list all the files matching some regex in a directory, and then make some some string replacement on the name of the files, and then a cat on the... (2 Replies)
Hello,
i need to search one word (snp1) from many files and copy the content of the columns of this word in new file.
example:
file 1:
SNP BP CHR P
snp1 1 3 0.01
snp2 2 2 0.05
.
.
file 2:
SNP BP CHR P
snp1 1 3 0.06
snp2 2 2 0.3
output... (6 Replies)
I am trying to program a script that is using grep to find lines in a file in my home directory, and then use a pipe command to copy what is shown into different files in a different directory to create backup files. When I run it, though, it only creates a copy of the file that grep was going... (7 Replies)
Hello
someone told me to use
OS=`awk '{print int($3)}' < /etc/redhat-release`
instead of
OS=cat /etc/redhat-release | `awk '{print int($3)}'`
any idea for the reason ? (5 Replies)