10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ?
/tmp
file1.txt
file2.txt
ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt
cat output.txt
file1.txt
file2.txt
output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies
2. Shell Programming and Scripting
Dears,
Would you please help on following bash script:
I want to get the most recent file named alfaYYYYMMDD.gz in one directory:
for example:
in directory /tmp/
ls -ltr
alfa20130715.gz
holding.gz
alfa20130705.gz
sart.txt
merge.txt.gz
alfa20130802.gz
my result shoud be... (1 Reply)
Discussion started by: maxsub
1 Replies
3. Shell Programming and Scripting
Hi all,
I need a shell script to write into a .txt file the no of files in a directory with extension and separated by comma in between. For eg, a directory contains files like
a.csv
b.csv
c.csv
d.csv
Then the output in the output.txt file should be like
a.csv,b.csv,c.csv,d.csv
... (3 Replies)
Discussion started by: dubuku_01
3 Replies
4. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
5. UNIX for Dummies Questions & Answers
dear all.
how can i copy a list of files with different names into others directory have the same name
like i have 3 files
10_10
10_10_11
10_10_11_12
and i have 3 directories
10_10
10_10_11
10_10_11_12
how can i make a loop to cp this files into the directory have the same name like... (31 Replies)
Discussion started by: t17
31 Replies
6. Shell Programming and Scripting
dear all.
how can i copy a list of files with different names into others directory have the same name
like i have 3 files
10_10
10_10_11
10_10_11_12
and i have 3 directories
10_10
10_10_11
10_10_11_12
how can i make a loop to cp this files into the directory have the same name like... (0 Replies)
Discussion started by: t17
0 Replies
7. 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
8. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
9. AIX
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies
10. Shell Programming and Scripting
Hi,
Consider a flat file abc.conf contains some rows. Each row contains the directory name with full path. now I want to find a particular file in every directory which are mentioned in the abc.conf file. How it can be done through unix shell script. (2 Replies)
Discussion started by: surjyap
2 Replies