10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
// Redhat
I have this code working, but need to add one more qualification so that I don't overwrite the files.
#!/bin/sh
cd /P2/log/cerner_prod/millennium/archive/
for f in *
do || continue #If this isn't a regular file, skip it.
&& continue #If a backup already... (2 Replies)
Discussion started by: Daniel Gate
2 Replies
2. Shell Programming and Scripting
Hi,
I am new to scripting and i am trying to use below script to copy code to multiple servers and multiple locations on each server. the script is not working or doesnt give any error. Any help is appreciated. basically i want a script to get the code from a location (dir below) and read the... (2 Replies)
Discussion started by: Ron0612
2 Replies
3. 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
4. Shell Programming and Scripting
Hello,
I'm trying the solve the following problem.
I have a file which I intend to use as a csv called master.csv
The columns are separated by commas.
I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern.... (3 Replies)
Discussion started by: cyphex
3 Replies
5. Shell Programming and Scripting
HI all,
I want to script where all the server names will be in a text file like
server1
server2
server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies
6. Shell Programming and Scripting
Hey Unix Gurus,
I'm having trouble in copying a file on 5 different servers, first how can you do it locally (i.e without the need to ssh to the server you want to copy the file) and if you need to ssh how do u run a command within that server. Please see my code below(it doesn't work somehow).... (10 Replies)
Discussion started by: sexyTrojan
10 Replies
7. Shell Programming and Scripting
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies
8. Shell Programming and Scripting
Dear All,
I have text file like this:
Header
Record 1
Record 2
.......
Record n
Tail
This line of code :
awk '{ if ( NR == 1 ) { head=substr($0,1,300);} else { last = substr($0,1,300);}END{printf "Header is : %-300s Trailer is : %-300s\n", head, last}' filename
converted Header... (11 Replies)
Discussion started by: 33junaid
11 Replies
9. Shell Programming and Scripting
Greetings -
I am a newbie in shell scripts. I have been thru the whole forum but there has been no similar query posed.
The objective of my system is to have a unified filebase system. I am using RSync to synchronise files between the location & central server with both of them having the... (4 Replies)
Discussion started by: evolve
4 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