Is it possible in Bash (or any other shell) to get a shell script to know it's own path without having to be part of $PATH or anything like that.
I need this cos i want the script to be able to rename the directory in which it resides.
is this possible? (6 Replies)
I am currently trying to find a way to loop through files in a given directory and for each file modify a ctl file and sql load it. I have been using the sed command to change the infile, badfile parameters of the control file. I have not yet tried to sql load it.
Requirement: files are ftp to... (1 Reply)
hi i wrote following script,
#!/usr/bin/sh
for index in `ls /tmp/common/*.txt`
do
echo "$index"
done
here index is giving full path but in my program i want only file names (not along with whole path)
Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt
... (6 Replies)
Hi Frdz
while read line
do
name=`echo $line | cut -d' ' -f 1 `
password=`echo $line | cut -d`-` -f 2`
name > logfile.txt
password > logfile.txt
done < list.txt
When it is run, am getting last values in list.txt file only,it is not storing lall the list entry values. How can i... (5 Replies)
When I run the following command in the shell it works fine. It prints a city name and then a path for a file.
~$ for i in `awk -F':' '{print $0}' /home/knoppix/Desktop/data/subs | grep -m 1 $ city | sed "s/:/ /"`
>do
>echo $i
>done
Now, when I place it in this shell script (sh) it prints... (6 Replies)
Hello forum members,
I have to create a out file in the current path./aaa/bbb/ccc/hhh.
i am writing script below.
###script Begins#####
#!/bin/ksh
echo "Weclome"
if
then
echo "Hello"
rm -rf $aaa/bbb/ccc/hhh #clean the exsisting o/p file
echo "no... (2 Replies)
I am generating a output:
Name Count_1 Count_2
abc 12 12
def 15 14
ghi 16 16
jkl 18 18
mno 7 5
I am sending the output in html email, I want to add the code:
<font color="red"> NAME COLUMN record </font>
for the Name... (8 Replies)
I'm trying to set the path permanently through a shell script. (/opt/quest/bin:/usr/bin/lab to /.profile.) I tired using echo option like below but it doesn't work. Please suggest me the right way to do so.
echo "PATH=$PATH:/opt/quest/bin:/usr/bin/lab" >> /.profile (6 Replies)
Hi
I have a mail attachment coming from a mail id and evreytime with the same name in .xls format.I have to download the .xls file into a location and convert it itno .csv format and copy the .csv file to another location. (1 Reply)
i am trying to write shell script
how to write shell script which is ask for user id and password then compare both from two different file..
i have no idea how to compare with data present in file..
#!/bin/bash -e
read -p "User ID: " first
read -p "Password: " second
if ;then
echo... (3 Replies)
Discussion started by: niko420
3 Replies
LEARN ABOUT DEBIAN
pppoe-setup
PPPOE-SETUP(8) System Manager's Manual PPPOE-SETUP(8)NAME
pppoe-setup - Shell script to configure Roaring Penguin PPPoE client
SYNOPSIS
pppoe-setup
DESCRIPTION
pppoe-setup is a shell script which prompts you for various pieces of information and sets up an /etc/ppp/pppoe.conf configuration script
for the pppoe-start, pppoe-stop and pppoe-connect scripts.
AUTHOR
pppoe-setup was written by David F. Skoll <dfs@roaringpenguin.com>.
The pppoe home page is http://www.roaringpenguin.com/pppoe/.
SEE ALSO pppoe(8), pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-status(8), pppoe-sniff(8), pppoe-relay(8), pppoe-
server(8)4th Berkeley Distribution 21 February 2000 PPPOE-SETUP(8)