Sponsored Content
Top Forums Shell Programming and Scripting Add filenames to top of each files in a directory Post 302997716 by Corona688 on Thursday 18th of May 2017 12:27:51 PM
Old 05-18-2017
You cannot possibly have been running the code he gave you.

Show exactly what you did please, word for word, letter for letter, keystroke for keystroke.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

looping thru filenames in a directory

Hi, i am very new to UNIX, i am trying to loop thru the files in a directory. I got the filenames into a variable using $files=`ls` Here $files will contain <filename1> <filename2> <filename3> I want to get one filename at a time and append it to some some text. forexample, ... (1 Reply)
Discussion started by: silas.john
1 Replies

2. Shell Programming and Scripting

concatenating the filenames in a directory

hi all, I have a requirement where in i have to read all the filenames based on a pattern from a directory and concatenate all these file names and write it to another file. i am using the following code to do this var1='' for filename in $_DIR/${FILE_NAME}* do if if then... (7 Replies)
Discussion started by: nvuradi
7 Replies

3. Shell Programming and Scripting

Change all filenames in a directory

I have a directory of files and each file has a random 5 digit string at the beginning that needs to be removed. Plus, there are some files that will be identically named after the 5 digit string is removed and I want those eliminated or moved. any ideas? (17 Replies)
Discussion started by: crumb
17 Replies

4. Shell Programming and Scripting

Adding characters at the top of all files in directory

Hi Unix experts; I have 30000 files in a directory and am willing to do the following changes on each of them. The input files look like the following: 1 , 2 3 , 4 5 , 6 7 , 8 9 , 10 the output will have # in top 10 lines, insert space instead of comma. This looks like: ... (4 Replies)
Discussion started by: nxp
4 Replies

5. Shell Programming and Scripting

Use filenames to create directory.

I have many files similar to this one: AC41_AC85_86_AC128_129_MC171_173_SF_207_FMV.pdf. I want a directory named AC41 and to put the file AC41_AC85_86_AC128_129_MC171_173_SF_207_FMV.pdf into the directory. Next, a directory named AC85 and put the file into it. Also, continue to cycle through... (1 Reply)
Discussion started by: ndnkyd
1 Replies

6. UNIX for Dummies Questions & Answers

Filenames change in a directory

Hi I have abc_ahb_one.v abc_ahb_two.v abc_ahb_three.v ........l like this -----upto abc_ahb_ninety.v in some directory. I need to change those file names to like below. ... (5 Replies)
Discussion started by: praneethk
5 Replies

7. Shell Programming and Scripting

[awk] print all filenames in directory

Hello, I was given a (I suppose) a simple task which I don't know how to do. Before coming here I have read a dozen of awk tutorials (full read, not just line-skipping) but I still don't know how to do this. Task: Write an script file 'check.awk' with a parameter current directory that... (5 Replies)
Discussion started by: c0dehunter
5 Replies

8. Shell Programming and Scripting

Printing filenames in my current directory

Can someone give me a tip on writing a script that, for each file in the working directory, prints the filename, the # of lines, and the # of words to stdout? (2 Replies)
Discussion started by: flash123
2 Replies

9. Shell Programming and Scripting

There are multiple filenames in the directory.How to return the the lastest files for each file name

there are mutiple file nams in the directory. How to return the the lastest files for each file name. ex. abc1234_050201 abc1234_050206 abc1234_050208 xyz34_050204 xyz34_050210 xyz34_050218 thanks (4 Replies)
Discussion started by: grand_sam
4 Replies

10. UNIX for Beginners Questions & Answers

How do I custom sort the files in a directory using the filenames in a text file.?

Hi all, (5 Replies)
Discussion started by: KMusunuru
5 Replies
VHIER(1p)						User Contributed Perl Documentation						 VHIER(1p)

NAME
vhier - Return all files in a verilog hierarchy using Verilog::Netlist SYNOPSIS
vhier --help vhier [verilog_options] [-o filename] [verilog_files.v...] DESCRIPTION
Vhier reads the Verilog files passed on the command line and outputs a tree of all of the filenames, modules, and cells referenced by that file. VERILOG ARGUMENTS
The following arguments are compatible with GCC, VCS and most Verilog programs. +define+var+value =item -Dvar=value Defines the given preprocessor symbol. -F file Read the specified file, and act as if all text inside it was specified as command line parameters. Any relative paths are relative to the directory containing the specified file. -f file Read the specified file, and act as if all text inside it was specified as command line parameters. Any relative paths are relative to the current directory. +incdir+dir =item -Idir Add the directory to the list of directories that should be searched for include directories or libraries. +libext+ext+ext... Specify the extensions that should be used for finding modules. If for example module x is referenced, look in x.ext. -sv Specifies SystemVerilog language features should be enabled; equivalent to "--language 1800-2009". This option is selected by default, it exists for compatibility with other simulators. -y dir Add the directory to the list of directories that should be searched for include directories or libraries. VHIER ARGUMENTS
--help Displays this message and program version and exits. --o file Use the given filename for output instead of stdout. --cells Show the module name of all cells in top-down order. --forest Show "ASCII-art" hierarchy tree of all cells (like ps --forest) --input-files Show all input filenames. Copying all of these files should result in only those files needed to represent the entire design. --instance Show module instance names. --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009> Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common "do" (data- out signal, versus a do-while loop keyword). --resolve-files Show resolved filenames passed on the command line. This will convert raw module and filenames without paths to include the library search path directory. Output filenames will be in the same order as passed on the command line. Unlike --input-files or --module-files, hierarchy is not traversed. --module-files Show all module filenames in top-down order. Child modules will always appear as low as possible, so that reversing the list will allow bottom-up processing of modules. Unlike input-files, header files are not included. --modules Show all module names. --nomissing Do not complain about references to missing modules. --missing-modules With --nomissing, show all modules that are not found. --synthesis Define SYNTHESIS, and ignore text bewteen "ambit", "pragma", "synopsys" or "synthesis" translate_off and translate_on meta comments. Note using metacomments is discouraged as they have led to silicon bugs (versus ifdef SYNTHESIS); see <http://www.veripool.org/papers/TenIPEdits_SNUGBos07_paper.pdf>. --top-module module Start the report at the specified module name, ignoring all modules that are not the one specified with --top-module or below, and report an error if the --top-module specified does not exist. Without this option vhier will report all modules, starting at the module(s) that have no children below them. Note this option will not change the result of the --input-files list, as the files needed to parse any design are independent of which modules are used. --version Displays program version and exits. --xml Create output in XML format. DISTRIBUTION
Verilog-Perl is part of the <http://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from http://www.veripool.org/verilog-perl <http://www.veripool.org/verilog-perl>. Copyright 2005-2012 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. AUTHORS
Wilson Snyder <wsnyder@wsnyder.org> SEE ALSO
Verilog-Perl, Verilog::Getopt, Verilog::Preproc, Verilog::Netlist perl v5.14.2 2012-05-04 VHIER(1p)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy