10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I want to run my script and want to ensure it captures all logging.
For e.g I got this from another forum
# Redirect the current stderr into stdout
exec 2>&1
# Redirect the current stdout into the log file
exec 1>timer_log.log
The script will print stderr onto the putty terminal... (4 Replies)
Discussion started by: aixkidbee
4 Replies
2. Shell Programming and Scripting
Hello,
Hitting a wall on this one. When at the command prompt it works fine:
# find /home/testuser -name 'PAINT*canvasON.txt'
/home/testuser/PAINT_canvasON.txt
# pwd
/home/testuser
# ls -l PAINT*canvasON.txt
-rw-r--r-- 1 root user 23 Feb 07 02:58 PAINT_canvasON.txt... (2 Replies)
Discussion started by: seekryts15
2 Replies
3. Shell Programming and Scripting
Hi ,
I've learnt that the following command will remove the files from the given folder for given no.of days
find /home/etc -type f -atime -10 -exec rm -f {} \;
But how can I change the above command that will move the files to another specified directory instead of removing the... (1 Reply)
Discussion started by: smile689
1 Replies
4. Shell Programming and Scripting
Hello,
I am trying to use regex wtih find command in KSH. For some reason it is not working as expected.
Input:
comm_000_abc_0102.c
comm_000_abc.c
456_000_abc_1212.cpp
456_000_abc_.cpp
Expected Output:
comm_000_abc_0102.c
kkm_000_abc_8888.cpp
(Basically I want to find all... (6 Replies)
Discussion started by: vinay4889
6 Replies
5. Shell Programming and Scripting
Hi!
I made a shell script which is offering menu choice. I made it on RHEL & then with little bit changes I was able to run successfully on AIX/ksh.
Script is working fine with no issues other than a little one i.e., There is one choice in which I can list out and delete some files from a... (10 Replies)
Discussion started by: sukhdip
10 Replies
6. Shell Programming and Scripting
set -A allfiles `find $usrhtml -type f`
i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies
7. Shell Programming and Scripting
Hi Forum.
When I run the following find command, I get the desired results:
find . \( -name a.out -o -name '*.o' -o -name 'core' \) -type f -ls
I want for my script to dynamically calculate and assign a variable var1 to contain all the files that I want to search instead of hard-coding.
... (2 Replies)
Discussion started by: pchang
2 Replies
8. Shell Programming and Scripting
I have the following FTP embedded in a Ksh script on AIX 5.3
ftp -n <<WHATEVER
open 10.101.26.218
user hcistats *******
ascii
put $thupdatefile
put $thcollectfile
quit
WHATEVER
Here is what my script returns:
... (3 Replies)
Discussion started by: troym72
3 Replies
9. UNIX for Advanced & Expert Users
Hi experts,
I have a simple shell script as follows.
#!/bin/ksh
FIND_STRING="\( -name 'testfile*.Z' -o -name 'DUMMY_*' \) "
find /tmp -type f $FIND_STRING -print
When I run this with ksh -x testscript, I get the following output.
+ FIND_STRING=\( -name 'testfile*.Z' -o -name... (6 Replies)
Discussion started by: kodermanna
6 Replies
10. Solaris
Dear All,
I want to enable the tracing for a user and logging all things he do in a log file..........
Thaaanks (2 Replies)
Discussion started by: adel8483
2 Replies