10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a bash script that is running a mysql query and creating a csv file with a time stamp. It then uploads that to a ftp server. Everything works great when I manually run it. But then I have a cron job set to run every monday, wednesday and friday at 5am est. When the cron job runs, it... (7 Replies)
Discussion started by: akallenberger
7 Replies
2. Shell Programming and Scripting
Hello.
I want to to backup some "default:" values from a file do some other job and after restore that "default:" values back.
The problem is that the source and destination file has a lot of default: strings in it but with different values...
So..
Here is an example:
A part of my source... (6 Replies)
Discussion started by: ausdim
6 Replies
3. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
4. Shell Programming and Scripting
Hello,
I have a very basic script
#!/usr/bin/ksh
while
print ' '
print ' 1. View Command History '
print ' 2. List files in current Directory '
read opt'?Enter Option> ' ;do
if ;then
fc -l
fi
#
if ;then
ls -la
I want to... (10 Replies)
Discussion started by: Grueben
10 Replies
5. UNIX for Dummies Questions & Answers
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Discussion started by: victor.s
3 Replies
6. Shell Programming and Scripting
Hi,
i want to create an user-friendly script where you are asked for two numbers. i would like that these two number to be separated with "--" for example, but i can't figure out how to do this.
for example
read -p "Insert lowest and highest value: " min ; echo -n "-- "; read max
so... (3 Replies)
Discussion started by: ezitoc
3 Replies
7. Shell Programming and Scripting
I'm trying to write a script that will do an ls of a location, echo it into a file, and then read that file and selectively delete files/folders, so it would go something like this:
cd $CLEAN_LOCN
ls >>$TMP_FILE
while read LINE
do
if LINE = $DONTDELETE
skip
elseif LINE =... (2 Replies)
Discussion started by: MaureenT
2 Replies
8. Shell Programming and Scripting
Sorry about the title, but this should be fairly self-explanatory.
My script seems to work, except that in the output, below, the first three lines are correct, but why does it print the additional lines 4, 5, & 6?
Script:
#!/bin/bash
while read;
do
client="$(grep -m 1 Client | awk... (3 Replies)
Discussion started by: MrKen
3 Replies
9. Shell Programming and Scripting
I was searching for an option where i can echo some strings together with the contents of a file.
Eg. I was to echo the below string to a file
"alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt
The value 2009 is coming from a file called date.txt without the... (3 Replies)
Discussion started by: Celvin VK
3 Replies
10. UNIX for Dummies Questions & Answers
I am trying to write a bash script that takes a file as an argument and appends my name if this file ends in .txt... I am not sure how to do this though. Any help is greatly appreciated! (4 Replies)
Discussion started by: GTRocker8824
4 Replies