04-04-2007
Try this:
for EachFile in `ls -1 gspp*`
do
echo "EachFile = "$EachFile
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file a.lst which lists all files.
as
a.dat
b.dat
c.dat
I want to process these files mentioned in the list file in a loop.
Say I want to display only the first line of all the files a.dat , b.dat, c.dat.
How can I go about it?
Please help. (5 Replies)
Discussion started by: dharmesht
5 Replies
2. Shell Programming and Scripting
Okay...
I've solved one problem.
Here's the next.
I'm writing a script file that needs to go through a directory and list all files in that directory.
I'm using TCL/TK.
I figured out how to go through the directory and how to loop through it, but I ran into a little problem.
... (2 Replies)
Discussion started by: kapolani
2 Replies
3. Shell Programming and Scripting
I posted this in the Solaris forum, but I don't think it's platform specific, so I'm posting it here.
Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we... (6 Replies)
Discussion started by: Fred Goldman
6 Replies
4. Shell Programming and Scripting
Hi all,
I'm having a problem with a script which should ultimately provide a filename by reading a value from file1 and file2 then join together.
I'm planning to use a loop/ loops to get the values out of both files and create a single string unfortunately the code currently treats the second... (7 Replies)
Discussion started by: chris01010
7 Replies
5. Shell Programming and Scripting
I am trying to write a script that loops through all the files in the current directory that end in '.slg.gz' and runs a parser on each file. Here is my code:
#!/bin/bash
FILES_HOME = 'dirname $0'
for i in $(ls $FILES_HOME/.slg.gz$);do
./run-feature-parser $(i) > OUTPUT.csv
done ... (1 Reply)
Discussion started by: kssteig
1 Replies
6. Shell Programming and Scripting
I am writing a ksh which has to load 7 files(.dat files) from input directory into oracle tables using sql loader. The process has to take each file at a time and once if it is loaded succesfully using sql loader into oracle tables then the process has to pick next file and load it into oracle... (2 Replies)
Discussion started by: vpv0002
2 Replies
7. Shell Programming and Scripting
Hi all, I am trying to make a for loop invoking files with different extensions (*.ugrd and *.vgrd) and I cant just make it work. Cant figure out how to load the files so as to use them in subsequent commands like the ones in this pseudo code. the files are arranged such that in one date for... (8 Replies)
Discussion started by: ida1215
8 Replies
8. Shell Programming and Scripting
So my script is supposed to repeat for every server in my file, but as of now it is getting stuck on my awk commands
# Read file cred.txt (with one IP per line), connect to servers (one at a time), and download directory listing
i=1
param=$(sed -n "{$1}p" $parm_dir/cdm_param.txt) #Get the last... (6 Replies)
Discussion started by: MJCreations
6 Replies
9. Shell Programming and Scripting
Hi all ,
I am new on this forum . I have to face a particoular implementation issue and I need some help .
Requirement :
I need to read a particoular file (an xml file) and after reading it I need to call an Oracle Stored Procedure passing the content of the file as paramenter , in order... (3 Replies)
Discussion started by: Kolas79
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I've got a folder with several files I'd like to manipulate. The file names are all ending in .txt and I'd like to loop through their names for manipulation. This is the script I've got so far:
for i in 'ls *.gtc.txt|cut -d "." -f1';
do
echo${i};
done
It should be easy enough, but... (2 Replies)
Discussion started by: zajtat
2 Replies
ha(1) HA archiver ha(1)
NAME
ha - a small file archiver utility
SYNOPSIS
ha <command>[<option><option>...] archive [ name ... ]
DESCRIPTION
After the program name comes a command name (single letter) and options (single letters, appended to the command name without a space).
COMMANDS
a[sdqemr012]
Add files matching search pattern to archive.
e[aqty]
Extract files matching search pattern from archive.
x[aqty]
Extract files matching search pattern from archive using path information stored in archive.
l[f] List files currently in archive.
d[q] Delete files matching search pattern from archive. If archive does not contain any files after deletion it is removed.
f[sdqemr012]
Freshen files in archive. All files matching search pattern and newer than version already in archive are updated to archive.
u[sdqemr012]
Update files to archive. All files matching search pattern that are newer than version already in archive or are not yet in archive
are updated to archive.
t[q] Test files in archive.
OPTIONS
0,1,2 Try compression method #. More than one can be specified.
Methods are:
0-CPY Simple copying of files.
1-ASC Default method using sliding window dictionary followed by arithmetic
coder. Offers quite good compression on wide variety of file types.
2-HSC Compression method based on finite context model and arithmetic
coder. Quite slow for binary data, but offers very good compression
especially for longer text files.
y Assume answer yes on all questions.
t Touch files when extracting. Sets file times to current machine time.
r Recurse through subdirectories while searching for files matching search pattern.
f Full listing of stored file information.
m Move files when archiving. Files are removed from disk after they are successfully written to archive.
a Set system specific file attributes when extracting files.
s Find special files when archiving.
e Do not store pathname information.
q Quiet operation.
d Make separate entries for directories. Saves information about empty directories, directory attributes etc. in archive.
AUTHOR
This manual page was written by Mikhail Gusarov <dottedmag@dottedmag.net> for Debian GNU/Linux system (but may be used by others).
ha 0.999p 3 Jul 2008 ha(1)