10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
hi,
how can i take the file names from a directory and store only the filenames in the file.
suppose i have a directory which contains the following files and subdirectories.
$ ls -ltr
total 16
-rw-rw-r-- 1 adm etc 4 Aug 6 20:37 s1.txt
-rw-rw-r-- 1 adm etc 4 Aug 6 20:37 s2.txt... (11 Replies)
Discussion started by: Little
11 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
Here is seeking a bit of help in trying to solve a problem.
I am required to create a csv file as shown below:
output.csv ->
output_1,output_2,output_3,...,output_<N>
filename1:20,filename2:30,filename3:30,...,filename<N>:30
by listing output_1, output_2,... , output<N> as... (3 Replies)
Discussion started by: vkumbhakarna
3 Replies
4. Shell Programming and Scripting
I need to get the names of files which are starting with a string testfile. Also i want to create a XML file in the same location and write these file names into the XML.
Ex:
<path>
<dir>
<file>testfile1</file>
</dir>
<dir>
<file>testfile2</file>
</dir>... (4 Replies)
Discussion started by: vel4ever
4 Replies
5. Homework & Coursework Questions
first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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