10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dears,
I have a listfile contains list of files path.
i need to read the line of the listfile
mv the file to other directory
and update the listfile by deleting the lines of the listfile.
#!/bin/bash
target=/fstest/INVESTIG/Sadiq/TEST_ARCH
while read -r line || ];
do
mv $line... (19 Replies)
Discussion started by: sadique.manzar
19 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
Can any one help me to list out the directory names which contain the specified file.
See for example
File name : file.201307014.LKT
Have the directory structure as below.
/app/work/data/INDIA/file.201307014.LKT
/app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Discussion started by: Balasankar
5 Replies
3. Shell Programming and Scripting
Hi All,
Please help.
I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here
file1
dir1
dir2
dir3
dir4
file2
dir5
dir6
dir7
dir8
file3
dir9
dir10
dir11
dir12 (6 Replies)
Discussion started by: Piyush Jakra
6 Replies
4. Shell Programming and Scripting
I have a file with the contents below
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
jan_t=null;feb_t=feb;mar_t=mar;year=2010
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
I want to extract out all the fields values ending with "_t" , however, i want to exclude feb_t and mar_t from the results
In... (6 Replies)
Discussion started by: alienated
6 Replies
5. Shell Programming and Scripting
Hello Can you please help and check what im missing on script below
the goal is to delete the old files more than 7 days old but not the excluded file list inside excluded.dat file
#!/bin/sh
EXCLUDE=/path/to/exclude/exclude.dat
FIND=/bin/find
for xfile in '(read $EXCLUDE)'
do
$FIND... (9 Replies)
Discussion started by: angst_nu
9 Replies
6. 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
7. Solaris
Hi all,
My need is to search for a given string "toto" within a directory, but the search should ignore binary and db files.
It is in fact, a combination of xargs grep that I didn't succeed to manage.
Let we say that we are under /etc/ and we want to search for all included files (except... (9 Replies)
Discussion started by: mdjebbi
9 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I'm looking for a bit of help. Im trying to search a file for lines that contain white spaces at the end of the lines. This is what I'm using where $param is the path and file name and it redirects the output to a txt file :
echo | grep -n ' $' $param >> $2
Is it possible to have... (8 Replies)
Discussion started by: gintreach
8 Replies
9. Shell Programming and Scripting
Hi All,
I need to create a file which contains the list of all the files present in that directory.
e.g.,
ls /export/home/user/*.dat > list_file.dat
but what i am getting is:
$ ls /export/home/user/*.dat > list_file.dat
/export/home/user/*.dat: No such file or directory
But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
10. UNIX for Dummies Questions & Answers
Good day every body,
Iv've been given a list of files and directory requested by the Auditor's. My problem is how do i list the file with the permission given and also save the file into text.file so that i can passed the result/oucome to them?? Thanks alot guys!! (2 Replies)
Discussion started by: gagasan_makmur
2 Replies