Hi need to know if we can write a shell script to find files for a particular format;s ie both .csv and .txt in a particular folder and then copy them to a new folder on a dialy basis. Does anyone know how this can be accomplished?
This command recursively finds from the current directory and subdirectories, files with names as per the below criteria.
After . the first character must be c or t (For .csv and .txt files)
After . the second character must be s or x (For .csv and .txt files)
After . the third character must be v or t (For .csv and .txt files)
Anyway, other combinations will also match (like .cxt) which I mentioned in my previous reply.
The exec in the above command copies all the found files (i.e, all .csv and .txt files we need) to the directory called newfolder.
Note: Better to have newfolder outside the current directory and not as a subdirectory in the present directory.
Hello All,
Since i'm relatively new in shell script need your guidance.
I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder.
so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
my qn is i have one file hex.txt.it contains some junk data and some hexa valueslike
hex.txt
sdfjhjkh 0x1233jkfhgjfhgajk;gha 0xacdd
jkgahfjkgha;sjghajklgha;gh
aghfjkgh;a
0xccc jhfjkhsd ox23cd
0x456 jkhdfjhjkafh
like this now iwant a script like to separate the hex values and paste into the... (12 Replies)
Hi need help with a script or command
My requirement is
- I need to do a "ls -ltr tcserver*.syslog" files in /tmp, direct the output to a file
ls -ltr tcserv*.syslog | grep "Jan 31" | awk '{printf "\n" $9}' > jandat.logs
-Then open each file in above list and search for string/word,... (4 Replies)
I am a newbie and would like some help with the following -
Trying to search fileA for a string similar to -
AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3
I then want to replace that string with a string from fileB - ... (5 Replies)
hi all,
i'm new to shell scripting, i need help from u guys to do my task now..
i just need to check a file extension existence in a directory, and if it exists then i have to continue my processing.
pls give me the command to check the extension of the files (6 Replies)
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)
Greetings to all!!:b:
I have one root folder containing several other folders inside it. This tree structure is deep. And the files are of similar extension.
I need to start at the top level and recursively search and rename all the files with say .a extension to .b .
This is the code to... (7 Replies)
Greetings to All ... :b:
I have one root folder containing different other folders within it.
I need to get the list of all different types of file extensions residing in those folders.
Could anyone help me providing some shell script? (1 Reply)
Hi,
I am newbie in UNIX so please excuse for my questions.
Is there a a way to search for string in files within folder and sub folder in particluar file extensions.
Ex. search for ABC in folder 'A'(including it's sub folders) in html, xml files.
Thanks,
Ani (2 Replies)