Sponsored Content
Top Forums Shell Programming and Scripting Execute multiple files in multiple folders and also output on same folder Post 302994461 by ctsgnb on Thursday 23rd of March 2017 07:04:22 AM
Old 03-23-2017
Assuming your folders & subfolders only contains the files you have to execute
Something like (may need some tweak but for inspiration)
Code:
find ./Sanity_test -xdev -type f -a ! -type d | while read x; do sh $x > $x.log; done

feel free to tweak and adapt to your needs
This User Gave Thanks to ctsgnb For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and replace files in multiple folders

Hi there, I would like to write a script to automate the copy and renaming of files in multiple dir. I have a generic file named s253e.prb and would like to copy this to multiple dir and rename it. Example: Dir is AL-M1 and the prb file name is AL-M1.prb. I would like to be able to... (6 Replies)
Discussion started by: lodey
6 Replies

2. UNIX for Dummies Questions & Answers

Copying multiple folders to local machine (don't know folder names)

Hi. I'm trying to copy multiple folders from the remote machine to the local machine. I wrote a batch file to run an ftp window. The problem I am having is that the only command to copy files is mget *, and this copies only files, not folders. For example, ftp ts555 cd ts555/test ' test... (5 Replies)
Discussion started by: leenyburger
5 Replies

3. UNIX for Dummies Questions & Answers

Using AWK: Extract data from multiple files and output to multiple new files

Hi, I'd like to process multiple files. For example: file1.txt file2.txt file3.txt Each file contains several lines of data. I want to extract a piece of data and output it to a new file. file1.txt ----> newfile1.txt file2.txt ----> newfile2.txt file3.txt ----> newfile3.txt Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies

4. Shell Programming and Scripting

Find files of type within folder copy multiple results to different folders

Ok question number two: I'd like to search a directory for multiple file types (rar, txt, deb) and depending on what's found, copy those files to folders named Rar, TextFiles, and Debs. I'm looking for speed here so the faster the script the better. I want it to be a function that I pass 1 argument... (4 Replies)
Discussion started by: DC Slick
4 Replies

5. Shell Programming and Scripting

awk, multiple files input and multiple files output

Hi! I'm new in awk and I need some help. I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files. Thanks in advance for help! :-) ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies

6. Shell Programming and Scripting

Script to move files in multiple folders

Hello all, I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders). Thank you (1 Reply)
Discussion started by: mmsiddig
1 Replies

7. Shell Programming and Scripting

Create Multiple UNIX Files for Multiple SQL Rows output

Dear All, I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File. The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files. Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies

8. UNIX for Dummies Questions & Answers

Unzipping a file which has multiple folders and each folder has the files with same name in it

Hi, I have a zipped file a.zip. This has got multiple folders in it say x and y. x contains a.txt and y contains a.txt. Is it possible to unzip this file and have the 2 files extracted and rename them to unique names. Thanks in advance. (1 Reply)
Discussion started by: arunkesi
1 Replies

9. UNIX for Dummies Questions & Answers

Creating a sub-folder in multiple folders

Hi I've been trying to find an answer to this question and was hoping someone would be able to help me. I want to add a sub-folder to to an existing structure: for example /toys/toy_1/new /toys/toy_2/new /toys/toy_3/new There are humdreds of theses folders - what i want to do is add a... (2 Replies)
Discussion started by: LouSan
2 Replies

10. Shell Programming and Scripting

Grep strings on multiple files and output to multiple files

Hi All, I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results. #!/bin/ksh ( a="/path/file1" b="path/file2" for file in... (4 Replies)
Discussion started by: am24
4 Replies
TWEAK(1)						      General Commands Manual							  TWEAK(1)

NAME
tweak - edit bitmap files, subfont files, face files, etc. SYNOPSIS
tweak [ file ... ] DESCRIPTION
Tweak edits existing files holding various forms of bitmap images. To create original images, use art(1) or start from an existing bitmap, subfont, etc. Tweak reads its argument files and displays the resulting bitmaps in a vertical column. If the bitmap is too wide to fit across the dis- play, it is folded much like a long line of text in an 81/2 window. Under each bitmap is displayed one or two lines of text presenting parameters of the image. The first line shows the bitmap's ldepth, the log base 2 of the number of bits per pixel; r, the rectangle cov- ered by the image; and the name of the file from which it was read. If the file is a subfont, a second line presents a hexadecimal 16-bit offset to be applied to character values from the subfont (typically as stored in a font file; see font(6)); and the subfont's n, height, and ascent as defined in cachechars(2). By means described below, magnified views of portions of the bitmaps may be displayed. The text associated with such a view includes mag, the magnification. If the view is of a single character from a subfont, the second line of text shows the character's value (including the subfont's offset) in hexadecimal and as a character in tweak's default font; the character's x, top, bottom, left, and width as defined in cachechars(2); and iwidth, the physical width of the image in the subfont's bitmap. There are two methods to obtain a magnified view of a character from a subfont. The first is to click mouse button 1 over the image of the character in the subfont. The second is to select the char entry on the button 3 menu, point the resulting gunsight cursor at the desired subfont and click button 3, and then type at the text prompt at the bottom of the screen the character value, either as a multi-digit hexa- decimal number or as a single rune representing the character. To magnify a portion of other types of bitmap files, click button 1 over the unmagnified file. The cursor will switch to a cross. Still with button 1, sweep a rectangle, as in 81/2, that encloses the portion of the image to be magnified. (If the file is 16x16 or smaller, tweak will just magnify the entire file; no sweeping is necessary.) Depressing buttons 1 and 2 within magnified images changes pixel values. By default, button 1 sets the pixel to all ones and button 2 sets the pixel to all zeros. Across the top of the screen is a textual display of global parameters. These values, as well as many of the textual values associated with the images, may be edited by clicking button 1 on the displayed value and typing a new value. The values along the top of the screen are: mag Default magnification. val(hex) The value used to modify pixels within magnified images. The value must be in hexadecimal, optionally preceded by a tilde for bit- wise negation. but1 but2 The boolean function used by the named button to set pixel values. The function may be specified either by name as defined in <libg.h>, e.g. DorS, or by simple boolean expression, e.g. S|D. In these expressions, S is the pixel value defined above and D is the pixel being modified. copy The boolean function used in the copy menu item. Under button 3 is a menu holding a variety of functions. Many of these functions prompt for the image upon which to act by switching to a gunsight cursor; click button 3 over the selection, or click a different button to cancel the action. open Read and display a file. The name of the file is typed to the prompt on the bottom line. read Reread a file. write Write a file. copy Use the copy function, default S, to transfer a rectangle of pixels from one image to another. The program prompts with a cross cursor; sweep out a rectangle in one image or just click button 3 to select the whole image. The program will leave that rectangle in place and attach another one to the cursor. Move that rectangle to the desired place in any image and click button 3, or another button to cancel the action. char As described above, open a magnified view of a character image in a subfont. close Close the specified image. If the image is the unmagnified file, also close any magnified views of that file. exit Quit tweak. The program will complain once about modified but unwritten files. To clear blocks of pixels, use copy with function 0. SOURCE
/sys/src/cmd/tweak.c SEE ALSO
art(1), cachechars(2), bitmap(6), font(6) TWEAK(1)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy