05-13-2009
Read directory and fill a file with this information
Hello All,
Got a question to make a script what reads a directory and put the file names from that directory in a file with some extra text.
ls /tempdir
output is:
file1.gfh
file2.txt
file4.zzz
these file names (always with an extention) must be placed in a line and written to a file
sample line could be:
this filename $filename with extention $extention is found and would be removed within 10 days
This output must be in one file.
Is this possible?
I know some small things how to do but cannot combine them and possible not all is correct :-)
ls /tempdir I know
how to put everything into a file
echo "this filename $filename with extention $extention is found and would be removed within 10 days" >> /test/output
but then it stops :-(
hope someone can help me further
regards Walt
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Basically i have done created the script below, and it functions ok, it prints the access rights the user has. But i need it to print the group permissions, and other permissions, it would also be helpful if i could print the permissions in numeric form aswell, if it is possible. I have looked in... (50 Replies)
Discussion started by: Makaveli.2003
50 Replies
2. Shell Programming and Scripting
I have a receive script file which had lots of direcorties to process,but now,I don't want to hardcode them,I need input the directory name in a Property.txt file,then write shell code to read the directory name from Property.txt to the script file so I can get flexible on it.But when I ran the sh... (3 Replies)
Discussion started by: joshuaduan
3 Replies
3. Programming
Dear Friends,
I m beginner unix programmer. I want to know, how to read and write directory or file contents in c++ ? (3 Replies)
Discussion started by: namrata5
3 Replies
4. Shell Programming and Scripting
I am having n files in a directory i want to read all the file names from the script file .It is better if any one provide a sample script.
Elaborating the scenario:
i am having n number of sql files in a directory i am running all the sql files from a single script.
sqlplus... (4 Replies)
Discussion started by: dineshmurs
4 Replies
5. Shell Programming and Scripting
Hi
I have directory which has 5 files names test1, test2, test3, test4, test5
Now i want to read file by file and generate md5checksum.
Command used is
md5sum test1.
How can i read file names one after the other and generate checksum and send the output to a file.
Please reply (3 Replies)
Discussion started by: vasuarjula
3 Replies
6. Programming
Friends,
I want to read BGP session information with C ( in FreeBSD ). The program will almost work like a sniffer. My FreeBSD box (which is not a BGP speaker) will look at BGP session information (after catching and parsing it) and take a decision based on the information it sees. :wall:
... (1 Reply)
Discussion started by: asadfx
1 Replies
7. Shell Programming and Scripting
HI all
When i do df -h,it displays the amount of free space.
Tell me a command or a script to fill the total space
to a certain percent (say 99%)
Thanks in advance (8 Replies)
Discussion started by: 2002anand
8 Replies
8. Shell Programming and Scripting
Hi Experts,
I am writing a shell script (for displaying disk space details) which is logging to 15 different servers using following command.
ssh userid@servername
It is prompting me for password for all 15 servers when I manually run it.
However , soon I would like to schedule this script... (4 Replies)
Discussion started by: ajaypatil_am
4 Replies
9. UNIX for Dummies Questions & Answers
I need my code to compare two different files that are in two completely different directories, How can I do this?
So for example, my code will look at file1 which is in my home directory, and compare the files with those from file2 that is in /abc/adf/adr/afc/adf/file2... does that make sense? (1 Reply)
Discussion started by: castrojc
1 Replies
SCAPIN(1) CAO-VLSI Reference Manual SCAPIN(1)
NAME
scapin - Scan path insertion
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
SYNOPSIS
scapin [-VRB] [-P file] Input_name Path_name Output_name
DESCRIPTION
SCAPIN is an automatic scan path generator for gate level netlists. SCAPIN inserts a scan path in the netlist Input_name and drives a new
netlist Output_name. This scan path contains all registers specified in the file Path_name.path (see below for the exact syntax). SCAPIN
adds also 3 new connectors in the netlist: scan_in, scan_out and scan_test in order to control the scan path. Eventually SCAPIN adds an
output buffer before the output connector scan_out (option -B).
ENVIRONMENT VARIABLES
MBK_WORK_LIB(1)
indicates the path to the read/write directory for the session.
MBK_IN_LO(1)
indicates the input netlist file format.
MBK_OUT_LO(1)
indicates the output netlist file format.
SCAPIN_PARAM_NAME
indicates the location of a parameter file (with extention .scapin) containing the properties (ports name, models name etc ...)
of all cells needed for the scan path insertion. (see below for the exact syntax)
OPTIONS
-V Sets verbose mode on. Each step is displayed on the standard output.
-R All registers of the scan path are replaced by an equivalent scannable register cell (called reg-mux). (With the default option
a simple multiplexor is added just before all registers of the scan path).
-B Adds an output buffer before the output connector scan_out.
-P file Specifies a parameter file (with extention .scapin) containing the properties of all cells needed for the scan path insertion.
(see below for the exact syntax)
# Example of .scapin file
BEGIN_MUX
MUX_MODEL mx2_x2
MUX_SEL cmd
MUX_INPUT_SEL i1
MUX_INPUT_NSEL i0
MUX_VDD vdd
MUX_VSS vss
MUX_OUTPUT q
END_MUX
BEGIN_REG
REG_MODEL sff1_x4
REG_CLK ck
REG_INPUT i
REG_VDD vdd
REG_VSS vss
REG_OUTPUT q
REG_MUX mx2_x2
REG_REG_MUX sff2_x4
END_REG
BEGIN_REG_MUX
REG_MUX_MODEL sff2_x4
REG_MUX_SEL cmd
REG_MUX_INPUT_SEL i1
REG_MUX_INPUT_NSEL i0
REG_MUX_CLK ck
REG_MUX_VDD vdd
REG_MUX_VSS vss
REG_MUX_OUTPUT q
REG_MUX_MUX mx2_x2
REG_MUX_REG sff1_x4
END_REG_MUX
BEGIN_BUF
BUF_MODEL buf_x2
BUF_INPUT i
BUF_VDD vdd
BUF_VSS vss
BUF_OUTPUT q
END_BUF
Path_name Specifies a parameter file (with extention .path) containing an ordered list of all instances (registers) of the scan path. It
contains also the name of the 3 connectors scan_in, scan_out and scan_test. (see below for the exact syntax)
# Example of .path file
BEGIN_PATH_REG
cs_0
cs_1
cs_2
END_PATH_REG
BEGIN_CONNECTOR
SCAN_IN scin
SCAN_OUT scout
SCAN_TEST test
END_CONNECTOR
SEE ALSO
MBK_IN_LO(1). MBK_OUT_LO(1). MBK_WORK_LIB(1).
BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM
/LIP6 Juin 29, 2000 SCAPIN(1)