read from folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting read from folder
# 1  
Old 07-10-2007
MySQL read from folder

Collegues
I have a number of files in a folder.
Each file I would like to exicute one shell script .
How to do it in shell
With tanks and regards
Jaganadh.G
# 2  
Old 07-10-2007
re:



hey man, try this one

for file in folder/* ; do
echo $file
done

gets more complycated when there's spaces in the file/folder names.
as of my experience this works in bash/sh/ksh.

# 3  
Old 07-10-2007
ls * | xargs -n1 script
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I want to read the content of a specific folder

Why does not work a cd in a shell schript file. How do you get to run it? I use these code: #!/bin/sh cd workspace array=($(ls -d */)) echo ${array} But it doesn't change to workspace editby bakunin: please user CODE-tags as required by the rules. Thank you. (12 Replies)
Discussion started by: Linuxmann
12 Replies

2. Shell Programming and Scripting

Bash script read specific value from files of an entire folder

Hello, I heva a problem creating a script that read specifc value from all the files of an entire folder I have a number of email files into a directory and i need to extrect from each file 2 specific values. After that i have to put them into a new file that looks like that: To: value1 ... (1 Reply)
Discussion started by: ahmenty
1 Replies

3. Shell Programming and Scripting

read (filenam.txt) then go to folder and delete (charactername.bic)

I am hosting a nwserver.That is a Neverwinter Nights game server on linux Ubuntu 11.04 server. I need help creating a script to read a .txt and retrieving character logins and character names. The game will make a .txt in folder home/nwn/(filenam.txt). Then I will make a crontab job to... (0 Replies)
Discussion started by: 222222quick
0 Replies

4. Shell Programming and Scripting

For loop to read folder which are not under processing

Hi, I want to read folders which do not have a file "processing" in a for loop ordered by timestamp. Currently im doing like this. Like cd /home/working for i in `ls -c1` do some command... done I want to exclude folders which have that "processing" file. The directory... (2 Replies)
Discussion started by: chetan.c
2 Replies

5. HP-UX

Lost Read permission on my folder

Hi I am a normal user on a HP-UX system which is meant for a large group. There are few directories which I think i am owner of. (Name of these directories is same as my username, and I usually have all the permissions in these directories). I was trying to give read and execute... (2 Replies)
Discussion started by: grvs
2 Replies

6. Shell Programming and Scripting

How read the name of present folder into a variable???

Dear all, Now I have a bunch of files need to be renamed. For instance, I have ten files in a folder with a name 'olefin', and I would like to change all the ten files name into 'olefin01,olefin02,...,olefin10'. I suppose it can be done with the command 'pwd'. However, the command 'pwd' will... (7 Replies)
Discussion started by: liuzhencc
7 Replies

7. Shell Programming and Scripting

How to read a subfolder one by one in parent folder?

Hi friends, I am getting some trubles in folder reading. I am having 10 subfolders inside server7 folder. i wanna to read a subfolder name first and check if the foldername gets started with "http". if so , i need to read a file inside that folder. This willl continue for... (1 Reply)
Discussion started by: kamatchirajan
1 Replies

8. Shell Programming and Scripting

Why does this only read the one folder?

for j in folder1 folder2 folder3 folder4 folder5 do find /tmp/$j -type f -newer /tmp2/newer.txt -exec cp {} /thisfolder1/ \; done. this only reads from folder1 and not the other folders. What's the problem here? (3 Replies)
Discussion started by: bbbngowc
3 Replies

9. UNIX and Linux Applications

read files from folder and then call another script

Hi, I am new to the Unix shell scripting world. It would be great if some body can help me with my requirement 1) Script (say script1.sh) which will take set of files from one folder (say input folder). 2) Take the first file from the folder and execute another script (script2.sh).Pass 2... (1 Reply)
Discussion started by: girishnn
1 Replies

10. Shell Programming and Scripting

read files from folder and then call another script

Hi, I am new to the Unix shell scripting world. It would be great if some body can help me with my requirement 1) Script (say script1.sh) which will take set of files from one folder (say input folder). 2) Take the first file from the folder and execute another script (script2.sh).Pass 2... (3 Replies)
Discussion started by: girishnn
3 Replies
Login or Register to Ask a Question