10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,:p
I made a script which do a backup on remote servers with a rsync command. I have a config.cfg with the IPs and the paths where it will copy the directory. The problem is that it doesn't match the paths, So, here my script and its output with the debug :
#!/bin/bash
# PATHS... (7 Replies)
Discussion started by: Arnaudh78
7 Replies
2. 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
3. Shell Programming and Scripting
Hi,
Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable?
for eg: suppose the PATH is being set as follows
PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4
... (2 Replies)
Discussion started by: royalibrahim
2 Replies
4. Shell Programming and Scripting
It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from:
/home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'.
I can't get the awk syntax right:
awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies
5. Shell Programming and Scripting
Im trying to extract a directory from a path entered by the user
Lets say the path is
path=/home/bliss/files/myfile.txt
i wanna extract "/home/bliss/files" from $path ... how can i do this? (4 Replies)
Discussion started by: mrudula009
4 Replies
6. Shell Programming and Scripting
hi,
I have a file path like usr/scripts/pass/bin and usr/scripts/pass/line
I want to extract first three characters using sed
Like for path usr/scripts/pass/bin i want to extract usr/scripts/pass
and for path usr/scripts/pass/line i want to extract usr/scripts/pass (10 Replies)
Discussion started by: Diggi
10 Replies
7. UNIX for Dummies Questions & Answers
if test -z "$1"
then echo "you must give a filename or filepath"
else path=`dirname $1`
f_name =`basename $1`
if path="."
then path=`pwd`
fi
fi
cat $f_name $path >> index.txt
The only problem I am encountering with this is writing $path to index.txt
Keeps going gaga:
cat:... (1 Reply)
Discussion started by: Vintage_hegoog
1 Replies
8. Shell Programming and Scripting
How to pass a file path to open a file?
I am using cygwin.
I want to open a file from a particular path, say C:\Test\File1,. This file path is stored in a variable.
I am able to cat a file like this :
cat "c:\Test\File1"
but i want the same thing to happen in my script file through a variable... (3 Replies)
Discussion started by: sandeep_hi
3 Replies
9. UNIX for Dummies Questions & Answers
Hello everyone,
I'm a unix noob. I have a powerbook running mac os x 10.4 and for one of my classes I need to install the latest version of php (5.0.5). I'm following the instructions at http://developer.apple.com/internet/opensource/php.html to install but I've run into a problem.
The... (2 Replies)
Discussion started by: kendokendokendo
2 Replies
10. UNIX for Dummies Questions & Answers
What is the smartest way to just extract file name from a full path name.
e.g. if I have
/usr/sanjay/bin/file_name.c
I want only file_name.c
Sanjay (2 Replies)
Discussion started by: sanjay92
2 Replies