Sponsored Content
Top Forums UNIX for Dummies Questions & Answers The output file is empty. Please Help Post 302163035 by newbie07 on Wednesday 30th of January 2008 11:25:36 PM
Old 01-31-2008
correct .....use complete path for the log file .. i experienced it few times and giving complete path helped in this kind of scenario.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Getting same exit status for empty and non empty file

Hi All, I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both. The value of $? is coming 0 in if part also and else part too. #!/bin/ksh if ]; then echo "data" # exit 0 echo "$?" else... (4 Replies)
Discussion started by: mavesum
4 Replies

2. Shell Programming and Scripting

Change output if file is empty

I'm very new to writing scripts, so here is my problem...I have the following code already written (in perl) system "rm file2"; open(FILE2, ">file2"); open(MYINPUTFILE, "file"); while(<MYINPUTFILE>) { my($line) = $_; chomp($line); print file2 "$line\n"; print... (2 Replies)
Discussion started by: ddrew78
2 Replies

3. Shell Programming and Scripting

empty option output error

I have a script (multirun.sh) which launches the program bsim_em.x or bsim_es.x depending on the value entered from the screen: > multirun.sh 1 (executes bsim_em.x) > multirun.sh 2 (executes bsim_es.x) which, simplifying, I do with the following lines in the multirun.sh script: if ... (3 Replies)
Discussion started by: josegr
3 Replies

4. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

5. Shell Programming and Scripting

Output only non-empty arguments

Hello, I am VERY new to shell scripting here, so please go easy. I have an assignment that requires creating a script using bash shell, outputting all command line arguments that are not empty ones such as " ", and showing total number of arguments. I know how to show the total with $# and all... (6 Replies)
Discussion started by: moderwarfare
6 Replies

6. Shell Programming and Scripting

Transfer output to empty file?

Hi all, I want transfer the echo data into file.txt.how? echo " $dir $group " >> ${file.txt} ---------- Post updated at 04:11 PM ---------- Previous update was at 03:10 PM ---------- anybody can help ? i mean in script output like echo " hello" i want transfer that output to file.txt. (4 Replies)
Discussion started by: proghack
4 Replies

7. Shell Programming and Scripting

Sent output to email and empty folder at same time

Hi all, i want to sent output to email and folder at same time. This is my code : echo "Hello" | mailx -s "${SUBJECT}" "${email_add}" >> ${file} I only can sent output to my email but cannot sent to my empty folder....can i know how to done it? (1 Reply)
Discussion started by: proghack
1 Replies

8. Shell Programming and Scripting

awk runs but output is empty

The awk below runs, however the output file is 0 bytes. It is basically matching input files that are 21 - 259 records to a file of 11,137,660 records. Basically, what it does is use the input files of which there are 4 to search and match in a large 11,000,000 record file and output the... (4 Replies)
Discussion started by: cmccabe
4 Replies

9. Shell Programming and Scripting

awk to reformat output if input file is empty, but not if file has data in it

The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format: input chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18 chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Beginners Questions & Answers

Parsing null or empty output

I am working an some if then statements for a script. I want to be able to check for alpha characters or empty out put then exit out. if ]]; echo "Serial Number Invaild" then exit 3; How do I account if the output is empty or null in this in this statement. Many thanks (6 Replies)
Discussion started by: andysensible
6 Replies
utimes(2)							System Calls Manual							 utimes(2)

NAME
utimes - set file access and modification times SYNOPSIS
DESCRIPTION
The function sets the access and modification times of the file pointed to by the path argument to the value of the times argument. The function allows time specifications accurate to the microsecond. For the times argument is an array of structures. The first array member represents the date and time of last access, and the second mem- ber represents the date and time of last modification. The times in the structure are measured in seconds and microseconds since the Epoch, although rounding toward the nearest second may occur. If the times argument is a null pointer, the access and modification times of the file are set to the current time. The effective user ID of the process must be the same as the owner of the file, or must have write access to the file or appropriate privileges to use this call in this manner. Upon completion, will mark the time of the last file status change, st_ctime, for update. RETURN VALUE
Upon successful completion, 0 is returned. Otherwise, -1 is returned and is set to indicate the error, and the file times will not be affected. ERRORS
The utimes() function will fail if: Search permission is denied by a component of the path prefix; or the times argument is a null pointer and the effective user ID of the process does not match the owner of the file and write access is denied. Too many symbolic links were encountered in resolving path. The length of the path argument exceeds or a pathname component is longer than A component of path does not name an existing file or path is an empty string. A component of the path prefix is not a directory. The times argument is not a null pointer and the calling process' effective user ID has write access to the file but does not match the owner of the file and the calling process does not have the appropriate privileges. The file system containing the file is read-only. The function may fail if: Pathname resolution of a symbolic link produced an intermediate result whose length exceeds SEE ALSO
<sys/time.h>. CHANGE HISTORY
First released in Issue 4, Version 2. utimes(2)
All times are GMT -4. The time now is 08:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy