11-28-2016
I'm not sure i follow ... but it looks like rsync could do the job for you ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
Here's the scenario:
I've got a script, let's call it script1. This script invokes another script, which we'll call set_env, via the dot "." command, like so:
File:
#!/bin/ksh
#
region_id=DEV
. set_env ${region_id}
and so on. Script set_env sets up an... (2 Replies)
Discussion started by: BriceBu
2 Replies
2. UNIX for Dummies Questions & Answers
In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command.
Anyone?
borgeh (3 Replies)
Discussion started by: borgeh
3 Replies
3. Shell Programming and Scripting
Hi All,
I've searched through the forum for a solution to this problem, but I haven't found anything. I have 2 script files that are in different directories.
My first script, let's call it "/one/two/a.sh" looks like this:
#!/bin/sh
IN_DIR=`dirname $0`
CUR_DIR=`pwd`
cd $IN_DIR... (4 Replies)
Discussion started by: mrbluegreen
4 Replies
4. Shell Programming and Scripting
Hi,
I am trying to use either awk or sed to drop the first two folders in a path. So if I had path /folder1/folder2/folder3/folder4.... I need to drop folder1&2, so the new path would be /folder3/folder4...
If folder1 and folder2 were the same all the time, this would be easy. But... (4 Replies)
Discussion started by: robertinohio
4 Replies
5. Shell Programming and Scripting
hi,
i need to replace a line a file with a new raw device location..
original file..
/opt/sybase/ASE1502/ASE-15_0/bin/dataserver \
-d/data/TST_AKS1/sybdevices/master.dat \
-e/logs/sybase/TST_AKS1/SFO_TST_AKS1.log \
-c/apps/sybase/ASE1502/ASE-15_0/TST_AKS1.cfg \... (2 Replies)
Discussion started by: aksaravanan
2 Replies
6. Shell Programming and Scripting
Hi there,
I'm trying to make a script that downloads something, but then strips the URL for later processing.
A user would input the following: ./text -install <link>
Lets say the <link> is:
Later on, the script would have to; unpack the file with the command: tar xvf... (6 Replies)
Discussion started by: Syekiya
6 Replies
7. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
8. Shell Programming and Scripting
/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.
/Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.
/Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies
9. Shell Programming and Scripting
Hi,
I have a list of paths with files at the end. How can strip off filenames.
This is what I have:
/apps/test/abc/file.txt
/apps/new/home/daily/report.xml
/apps/old/home/weekly/out/test.sh
This is what I need:
/apps/test/abc/
/apps/new/home/daily/
/apps/old/home/weekly/out/
... (10 Replies)
Discussion started by: djanu
10 Replies
10. Shell Programming and Scripting
Please help, I want script to check filename, size and date in specify path.
I want output as:
DATE: YYYYMMDD HH:MM
------------------------------------------------
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd... (1 Reply)
Discussion started by: akeji
1 Replies