10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2. Shell Programming and Scripting
I am attempting to rename files within a zipped archive with the beginning of the name of the zip file. For example unzip AAA_000.zip and rename file1.csv, file2.txt to AAA_file1.csv, AAA_file2.txt.
I am able to do this for a zip file with one file inside, but not for multiple files. This is... (2 Replies)
Discussion started by: lcp
3. UNIX for Dummies Questions & Answers
Hi ladies and gentleman.. I have two text file with me. I need to replace one of the file content to another file if one both files have a matching pattern.
XXXX,ABCD... (25 Replies)
Discussion started by: bananamen
4. Shell Programming and Scripting
Plese help I need a urgent requirement.
requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb
and then in the archive folder log files are name to test.tar
test.log ... (1 Reply)
Discussion started by: johney1981
5. Shell Programming and Scripting
I need to be able to take the results from ls -l command and modify the output as follows:
I will run
ls -l *.mak
My results will be
I then need to take those results and create a file that has the following info:
... (3 Replies)
Discussion started by: jclanc8
6. Shell Programming and Scripting
i have texts down.txt and down-new.txt and i want to check;
- if down-new.txt is NOT empty, then write date and its content to /home/gc_sw/down.txt
and after checking down-new.txt is NOT empty, down.txt should... (10 Replies)
Discussion started by: gc_sw
7. UNIX for Dummies Questions & Answers
I've setup a cron job that greps a file every five minutes and then writes (appends) the grep output/result to another file:
grep "monkey" zoo.log | tail -1 >> cron-zoo-log
Is there any way I can add the date and time (timestamp) to the cron-zoo-log file for each time a new line was added?
... (12 Replies)
Discussion started by: Sepia
8. Shell Programming and Scripting
how to make bash script to create foo.txt file and add current date into file content and that file always append.
example: today the script run and add today date into content foo.txt
and tomorrow the script will run and add tomorrow date in content foo.txt without remove today... (3 Replies)
Discussion started by: chenboly
9. UNIX for Dummies Questions & Answers
i need a script which will create a archive of the files older than 10 days........ (2 Replies)
Discussion started by: jayaramanit
10. UNIX for Dummies Questions & Answers
After checking all the UNIX threads, I am able to come up with a solution so far. I am working on a shell script where it moves the files to a certain directory. The conditions to check are
1) Check if the file exists in the current directory.
2) Check if the destination directory... (2 Replies)
Discussion started by: madhunk
TIME_SLEEP_UNTIL(3) 1 TIME_SLEEP_UNTIL(3)
time_sleep_until - Make the script sleep until the specified time
bool time_sleep_until (float $timestamp)
Makes the script sleep until the specified $timestamp.
- The timestamp when the script should wake.
Returns TRUE on success or FALSE on failure.
|Version | |
| | |
| | Description |
| | |
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms. |
| | |
If the specified $timestamp is in the past, this function will generate a E_WARNING.
A time_sleep_until(3) example
//returns false and generates a warning
// may only work on faster computers, will sleep up to 0.2 seconds
All signals will be delivered after the script wakes up.
sleep(3), usleep(3), time_nanosleep(3), set_time_limit(3).
PHP Documentation Group TIME_SLEEP_UNTIL(3)