I am new to Unix and trying to learn as much as I can. But I do not need to create urgent scripts that I can use instantly.
One of the scripts I am trying to write is essentially something that takes in a .txt file with product names.
The product names are looked up in various directories and folders to find the file with .xls extension and outputting the full extension path against each of the input file.
e.g: The input file : Beer_names.txt (consisting of various names of beers), for this I will take Duos.
It looks up throughout the directories and folders to find the Duos.xls file and outputs the exact location of the file.
In this case the output could be something like:
As of now I have to individually search and locate each of the locations and copy the file paths. Can this be made as script???
Thank you,
un007
Moderator's Comments:
Please use CODE tags when displaying sample input, sample output, and code segments.
Last edited by Don Cragun; 05-01-2017 at 09:38 PM..
hello. i want to make an awk script to search an html file and output all the links (e.g .html, .htm, .jpg, .doc, .pdf, etc..) inside it. also, i want the links that will be output to be split into 3 groups (separated by an empty line), the first group with links to other webpages (.html .htm etc),... (8 Replies)
Hi I want to search the following in the entire file and put them in a diff file.
file 1 contains :
Non error probabilities are not decreasing in curve 1GEORGE_SGD_SUB
Mid Point RESCAP_SGD_SNU curve have errors
Non default probabilities are not decreasing in curve ABF_JPY_SUB
Mid Point... (3 Replies)
When I run the following command in the shell it works fine. It prints a city name and then a path for a file.
~$ for i in `awk -F':' '{print $0}' /home/knoppix/Desktop/data/subs | grep -m 1 $ city | sed "s/:/ /"`
>do
>echo $i
>done
Now, when I place it in this shell script (sh) it prints... (6 Replies)
Hi, I am not sure if this will work or not. I am getting a syntax error.
I am reading fileA, using an acct number field trying to see if it exists in fileB and output to new file. Can anyone tell me if what I am doing will work or should I attempt it another way? Thanks.
exec < "${fileA}... (4 Replies)
Hello All,
Here is what I am trying to do and maybe you guys can point me in the right direction. I have a file that contains the following string(s):
WARNING: </d1/test/program1> did not find item1
WARNING: </d1/test/program1> item1 does not exist
WARNING: </d1/test/program2> item1 failed... (1 Reply)
Hi All,
The script below read the path and searches for the directories/subdirectories and for the files. If files are found in the sub directories then read the content of the all files and put the content in csv(comma delimted) format and the call the write to xml function to write the
std... (1 Reply)
Hello Experts!
I am trying to perform a common task, searching data from within a file and placing what is found into another.However, I have not been able to figure the “How to” with this situation.
I need to search through all lines within this text and pull the first positional attributes... (5 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Hello Tech Guys,
I have two files named check.txt and output.txt
Content of check.txt
620070527336551 40201800027285
620070551928314 40201800027285
620070534376312 40201800027285
620070536668046 02711306140261
620070248491123 02711306140261
620070553851296 02711306140261... (4 Replies)