10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have ssh password less auth enable & script does the job well as well
#/bin/bash
for i in `cat ip`
do
scp /etc/resolv.conf root@$ip
done
But I need to take backup of the file i will overwrite .. is there any simple way ?
Kindly respond (5 Replies)
Discussion started by: heman96
5 Replies
2. Shell Programming and Scripting
Hi Guys,
My requirement as follows,
i want to write a shell script to display the files of a folder, i export it to a file to mail the file. The problem is the exported file is getting appended every time I run the script. I just want the file to be over written. can anyone suggest??
... (4 Replies)
Discussion started by: Karthick N
4 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
How do i overwrite a sourced script variable value.
Sourced Script:
GEN_PARAM_LIST4=""$LOG_DIR"/dwh_GenerateXMLFile.lst"
GEN_PARAM_LIST4_v2=""$LOG_DIR"/dwh_GenerateXMLFile.v2.lst"
I am using below statement for replacing.
Script2:
&&... (1 Reply)
Discussion started by: Ariean
1 Replies
4. Shell Programming and Scripting
Hi all,
I am trying to use the Ex editor and its commands in a script - more specifically within an if statement within a while loop.
Here are the basics of the loop:
cat $file1 | while read line
do
grep $line $file2
if ]
then
echo $line > $file2
elseex $file2
/ESI185... (4 Replies)
Discussion started by: luke222010
4 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I really wan't to know that how to edit a shell script with out using an editor..
Is there any command? (4 Replies)
Discussion started by: buddhi
4 Replies
6. Shell Programming and Scripting
Hello all,
This might be a dumb question...but i am running into this situation.
I have a shell script that is currently in running state. It has big sql's in it and will run for few days. What happens if I change the shell now?
Eg: a.shl is running and i want to mv b.shl a.shl
I... (5 Replies)
Discussion started by: gsjdrr
5 Replies
7. UNIX Desktop Questions & Answers
Hello,
I have an external file (file.txt). This shall be a kind of a config file for my shell script. I get the line numbers as to a corresponding entry by grep. Now I would like to substitute the corresponding line from the shell script back to the file and exactly on the same line number.
... (4 Replies)
Discussion started by: ACTGADE
4 Replies
8. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
9. UNIX for Dummies Questions & Answers
hello,
is there a way that i can produce a shell script without using editors..
i want it to be executable by sh....
my problem is that i dont know how to create the script eg. psycho to put the echo inside to output my message... but i dont want to use editor (12 Replies)
Discussion started by: psychobeauty
12 Replies
10. Shell Programming and Scripting
hi all,
i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ...
specifically, i'd like to:
(1) specify a src directory
(2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs
(3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies