10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
bash or c-shell On Solaris 10
I need a command that will list the files of a directory, and grep each of those filenames out of a static text file, and then only echo field 2 of the static text file.
Something like this:
#> ls -1 /home/dir/ | each filename grep $filename static.txt |awk... (4 Replies)
Discussion started by: ajp7701
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
With grep -ci word * I get a list of files either they have a hit, or the have not (0).
I wanted to pipe to a new list of files, which only shows the files where the string was found, and counted, not the whole bunch.
How to do this?
Any advice welcome!
with best regards,
Omar... (11 Replies)
Discussion started by: OmarKN
11 Replies
3. Shell Programming and Scripting
for XmlFileName in ${xmlFileNames}
do
XmlFileName=$(echo $XmlFileName | sed 's|./||') # Remove leading ./ path that find command prefixes to filenames
cp $XmlFileName $NEW_DIR/
done (1 Reply)
Discussion started by: emc^24sho
1 Replies
4. Shell Programming and Scripting
Hi,
I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat.
My OS is:
SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies
5. Shell Programming and Scripting
I have a file 1.txt with the below contents.
-----cat 1.txt-----
1234
5678
1256
1234
1247
-------------------
I have 3 more files in a folder
-----ls -lrt-------
A1.txt
A2.txt
A3.txt
-------------------
The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies
6. 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:
Here is the question:
Make a list of files in your home directory that were changed less that 10 hours ago,... (3 Replies)
Discussion started by: fight4love
3 Replies
7. UNIX for Dummies Questions & Answers
how can i list all files in my home directory that have a 4 digit id number, the line number where the id is located and the id itself not printing the entire line? (5 Replies)
Discussion started by: hobiwhenuknowme
5 Replies
8. Shell Programming and Scripting
Hi All, I need to grep few files which has words like the below in the file name , which i want to put it in a file and and grep for the files which contain these names and move it to a new directory ,
full file name -C20091210.1000-20091210.1100_SMGBSC3:1000... (2 Replies)
Discussion started by: anita07
2 Replies
9. Shell Programming and Scripting
I will be very grateful if someone can help me with bash shell script that does the following:
I have a list of filenames:
A01_155716
A05_155780
A07_155812
A09_155844
A11_155876
that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Discussion started by: manishabh
3 Replies
10. UNIX for Dummies Questions & Answers
Hi there!
I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files.
I have tried... (4 Replies)
Discussion started by: Pep Puigvert
4 Replies