The following code when run from the directory where the zip files exists will
For all the zip files
1. unzip the file
2. cd to the unzipped folder
3. rename the file with timestamp
4. create a copy of the renamed file with the extension .trg
Hi,
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)
Hey guy,
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)
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)
hi people,
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
for example;
down.txt:AAAA
SSSS
down-new.txt:123
456
and after checking down-new.txt is NOT empty, down.txt should... (10 Replies)
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
aa.mak
bb.mak
cc.mak
I then need to take those results and create a file that has the following info:
dsjj/ubin/aa
dsjj/ubin/bb
dsjj/ubin/cc
... (3 Replies)
Plese help I need a urgent requirement.
Ex: test.log
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
test1.tar
test2.tar
EX:
/home/abc/
test.log ... (1 Reply)
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.
Example:
text1.txt:
ABCD 1234567,HELLO_WORLDA,HELLO_WORLDB
DCBA 3456789,HELLO_WORLDE,HELLO_WORLDF
text2.txt:
XXXX,ABCD... (25 Replies)
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)
hi all,
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)