10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello nix Experts,
I am a *nix rookie and have run into this issue, can some one help me here and let me know what I am doing wrong.
/home/user1> while read n
> do
> echo $n
> done < <(find . -type f -ctime -1 | grep abc)
I am getting the below error:
-sh: syntax error near... (5 Replies)
Discussion started by: babyPen1985
5 Replies
2. UNIX for Dummies Questions & Answers
i have executed the following command in terminal
find /Users/vasu -name "*.txt" -print
and i am getting the result
/Users/vasu/file1.txt
/Users/vasu/file2.txt
/Users/vasu/file3.txtbut while i was trying to execute the same in the script it is not working,I tried with below logic in... (2 Replies)
Discussion started by: vmachava
2 Replies
3. Shell Programming and Scripting
Hi Guys,
I'm trying to find all files with a particular extension and then loop some actions. The problem is that if the files have spaces in their names I get end up being each word as a separate result rather than the entire file.
ext=".txt"
out=".rtf"
for i in $( find "$1" -name "*$ext" );... (9 Replies)
Discussion started by: imonkey
9 Replies
4. Shell Programming and Scripting
whats wrong with this script
for i in Users.csv abd.csv
> do
> find . -name $i
> done (2 Replies)
Discussion started by: theshashi
2 Replies
5. Shell Programming and Scripting
What's wrong with this script
for i in Users.csv anc.csv
> do
> find . -name $i
> doneDouble post. Continue here. (0 Replies)
Discussion started by: theshashi
0 Replies
6. Shell Programming and Scripting
I want to print each file i found using the find command. And not able to list the files at all here is the code
SEARCH_DIR="/filesinfolder";
PATH_COUNT=0
for result in "'/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a -name '*.csv' \) -o -name '*_xyz_*' \) -mtime 1'"
do... (1 Reply)
Discussion started by: nuthalapati
1 Replies
7. Shell Programming and Scripting
Hi,
Can anyone help with the problem below? I need to read all text files (file1, file2, file3) in a loop and find
file1.txt:
file2.txt:
File3.txt: (7 Replies)
Discussion started by: Lenora2009
7 Replies
8. Shell Programming and Scripting
STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address 001e.f75e.8cb4, MTU 1500
IP address... (1 Reply)
Discussion started by: irongeekio
1 Replies
9. Shell Programming and Scripting
I grep some thing from file then in a loop give to find one by one but not working.
#!/bin/bash
grep -H DocumentRoot /etc/httpd/conf.d/*.conf | awk -F' ' '{ print $3 }'| sort -u | uniq > path.txt
for j in `cat path.txt`
do
# echo "line is $i"
find "$j" -type d... (3 Replies)
Discussion started by: aliahsan81
3 Replies
10. Shell Programming and Scripting
I'm trying to write a script to archive some log files, and I'm getting a little stuck. My 'find' command by itself works great, returning all of the log files I need, but when I try to combine it with my loop, I'm getting an error. Here's what I have so far:
for FILENAME in $(find . -type f... (4 Replies)
Discussion started by: kadishmj
4 Replies