10 More Discussions You Might Find Interesting
1. SuSE
Hi,
I am using below code snippet to echo/display the files found
(matching a pattern from searchstring.out file) and the corresponding owner.
while read j
do
echo "Pattern to search is:- $j"
find / -name "*$j*" |\
while read k
do
echo "File found is:- $k"
owner=$(ls... (9 Replies)
Discussion started by: Vipin Batra
9 Replies
2. Shell Programming and Scripting
Hi,
Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds?
The scenarios is like this.
I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
Discussion started by: arijitsaha
10 Replies
3. Shell Programming and Scripting
Hi all,
Please i need an explanation for the following statements
ref_file=/tmp/cleanfiles export ref_file
touch `TZ=WAT+2 date "+%Y%m%d%H%M"` $ref_file
find . ! -name . -prune -type f ! -newer $ref_file -exec store_file.sh {} \; (1 Reply)
Discussion started by: anish_1982
1 Replies
4. UNIX for Dummies Questions & Answers
Hello all,
Something strange going on with a shell script I'm writing. It's trying to write a list of files that it finds in a given directory to another file. But I also have a skip list so matching files that are in that skip list should be, well uhm, skipped :)
Here's the code of my... (2 Replies)
Discussion started by: StijnV
2 Replies
5. Shell Programming and Scripting
hi
I am a newbee in Shell scripting (hardly 7 days)
I have to execute a shell script which looks like this
#!/bin/sh
var1=`date +"%Y%m%d"`
echo $var1
find . -name "$var1*" -exec mv {} Delete/ \;
the find command in the script is running independently but when kept in this script it is... (24 Replies)
Discussion started by: sweetnsourabh
24 Replies
6. Shell Programming and Scripting
Hello
I have a script which emails identifies the user ID of a user and sends them an email. A user can enter part of the name of the person he/wants to send the email to. Then I use the ypcat command to identify the UID of that person.
The problem I'm having, is building in an error trap... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies
7. Solaris
I have a sun4u system running Solaris 8. I tried running the df command but it returns a blank result. Also I'm unable to collect an explorer from this system as the OS complains that the disk is full. What could be going on here? (10 Replies)
Discussion started by: dperry1973
10 Replies
8. Shell Programming and Scripting
Hi all does find command return anything if the file to be searched is not found? Like if I search from a file in a dir does it return false or null if the file is not found? Please suggests. (3 Replies)
Discussion started by: Veenak15
3 Replies
9. Shell Programming and Scripting
I am running shell scripts on windows using Cygwin tool.
In my shell scripts, i want to add an error check, that verify whether a certain command is available or not.
For example if SED comamnd is not available in Cygwin, then it should exit with error message.
How do i write such shell... (2 Replies)
Discussion started by: mmunir
2 Replies
10. UNIX for Dummies Questions & Answers
I have a script that has the following command:
find /home/user -name test.dat
The script works as desired when running normally. However, when I run the script preceding it with 'sh', it fails. Is there something I need to account for when preceding the execution of the script with 'sh'? (1 Reply)
Discussion started by: bsavitch
1 Replies