Need to build Shell Script to search content of a text file into a folder consist several files
Have to read one file say sourcefile containing several words and having another folder containing several files.
Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which we have that word and the linenumber.
Outputfile format:
Filename Word Linenumber
Samething we have to do for all words. We can have same word in a single file multiple times and need to pick all line numbers.
---------- Post updated at 03:04 PM ---------- Previous update was at 01:32 PM ----------
Guys kindly help me to get the resolution. I am trying hard.
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
I am new to shell scripting. I am interested how to know how to sort a content of a file using shell scripting.
I've attached the 'Input file' and the 'expected output' to this thread.
Details provided in the expected output file will provide details on how the sort needs to be done.
... (16 Replies)
Hi,
I am trying to write a shell script which can read folder names from a text file and then go to the folder and picks up a xml file and write on my sipp script so that I can run the sipp script.
For example:
I have a text file called thelist.txt where I have provided all the folders... (7 Replies)
Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form
File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
I have 'n' number of files in a folder .each file in the folder "myfolder" is having the content like.
COLNAME
------------
AAAAAA
BBBBBB
CCCCCC
DDDDDD
...
...
...
ZZZZZZ
26 recrod(s) selected.
My request is by reading each file in "myfolder" and format each file such a way... (18 Replies)
hi ..
i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Compete noob question....
I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory
help please :eek: (9 Replies)
Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
hello,
i want to make a script to search the file contents in my home directory by a given date and output me the line that has the date... (10 Replies)