10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
i have a code in which when doing a for loop, i need to direct the output to two files, one just a single output, the other to always append (historical reasons).
So far i managed to do the following, which is working, but am still considering it as "dirty".
... (4 Replies)
Discussion started by: nms
4 Replies
2. Shell Programming and Scripting
Hi
I want to execute a cron job everyday at 14:50 hrs. I have a script like this:
TMP_FILE="/tmp/tmpcron.txt"
RES=0
/usr/bin/crontab -l >> $TMP_FILE
ADD_JOB="50 14 * * * /opt/mypath/scriptname.sh"
grep "scriptname.sh" $TMP_FILE >> /dev/null
JOB_NOT_EXIST=$?
if test $JOB_NOT_EXIST... (2 Replies)
Discussion started by: saurabhkoar
2 Replies
3. UNIX for Dummies Questions & Answers
I just can't figure it out , so please just give me a pice of advise how to:
The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
Discussion started by: raymen
4 Replies
4. UNIX for Dummies Questions & Answers
Dear friends,
I have created a script to rename all files in a directory by appending the file name with username (who created the file), the date it was created. For example, "apple.doc" should be renamed to "johnFeb23apple.doc" where "john" is the owner and "Feb23" is file created date. It... (4 Replies)
Discussion started by: djsnifer
4 Replies
5. Shell Programming and Scripting
I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o.
I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
Discussion started by: tinman47
14 Replies
6. UNIX for Dummies Questions & Answers
Hi.
I don't have any experience with making scripts in bash. I need a simple script to rename all files in a folder to the format file1.avi, file2.avi, file3.avi, and so on.....
Please note that the original files have different filenames and different extensions. But they all need to be... (2 Replies)
Discussion started by: dranzer
2 Replies
7. Shell Programming and Scripting
I'm trying to write a script that moves data that's older than 2 weeks to a different place.
It works well, EXCEPT, that when the script hits a file within a directory inside the working directory, it will move it to the root of the destination directory instead of putting it in the correct... (1 Reply)
Discussion started by: ugolee
1 Replies
8. Shell Programming and Scripting
Hi @ all :)
i made a very little shell script witch is working well when i'm launching it directly
like with ./script
but when i'm launching it by cron tab it work at half only.
the part of the script witch are not working are:
#!/bin/sh
apt-get updade
apt-get -s upgrade >>... (5 Replies)
Discussion started by: calibal
5 Replies
9. Shell Programming and Scripting
I'm working on a project that basically unzips three zip files.
When these unzip they create about 70+ directories with subdirectories of year/month with about 3 to 9 pdf files in each directory.
Basically, I'm needing to figure out a way to zip these pdf files up.
for instance the script... (1 Reply)
Discussion started by: Aixia
1 Replies
10. Shell Programming and Scripting
Hi
I am doing a process of converting all the values of key column into a row, for eg
Key col1 col2
1 1 1
1 2 1
1 1 3
1 3 1
2 ... (2 Replies)
Discussion started by: nvuradi
2 Replies