04-02-2015
I see.
Strangely trying your example as is works for me. Are you using a different shell for the script than on the command line? In any case doing something like bash -x scriptname may help with debugging.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi all,
Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc.
Working on box -
uname# uname -a
AIX appt 3 5 00C08AAF4C00
when i type man (some valid command)
it just returns me to the # prompt.
Its running on the KSH shell.
man was working but i was trying... (14 Replies)
Discussion started by: djdavies
14 Replies
2. AIX
hi all,
Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc.
Working on box -
uname# uname -a
AIX appt 3 5 00C08AAF4C00
when i type man (some valid command)
it just returns me to the # prompt.
Its running on the KSH shell.
man was working but i was trying... (6 Replies)
Discussion started by: djdavies
6 Replies
3. Cybersecurity
Hi,
I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this.
Thanks
Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies
4. Shell Programming and Scripting
Hi ,
I would like to assign command (with pipe) output to a variable. The code is as follows. The goal of the code is to get the last folder folder with a particular name pattern.
myDate=`ls | grep 2009 | tail -1`
echo "myDate=" $myDate
However, in the presence of the pipe, the code... (3 Replies)
Discussion started by: jeff_cen
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am having a list of directories with different login id's. My requirement is that i need to list the directories of my id and need to delete them. So i am using following code
ls -ltr ¦ grep userid ¦ rm -rf
But this is not working. So is there any way of doing it. Please note... (3 Replies)
Discussion started by: sarbjit
3 Replies
6. UNIX for Advanced & Expert Users
I would like to know why this command does not work.
I have a script which connects to and ftp site.
After getting the remote files localy i need move each remote file to a archive folder on the FTP site
*Please also note that some of the files have spaces in the file name.
Im trying to... (3 Replies)
Discussion started by: juanjanse
3 Replies
7. Shell Programming and Scripting
xargs work great when a command gives multiple line output which can be input to another. In my case it is not working coz the second command uses two words in it.
$ scr.sh
gives output like
193740
638102
375449
..
..
another command takes these number as inputs. it works great... (1 Reply)
Discussion started by: mahesh113
1 Replies
8. Shell Programming and Scripting
Hi Team,
Need a help on how to pipe a command out put to a shell script. My shell script looks like below.
cat shell_script
#!/usr/bin/ksh
input =$@
echo " we are inside the shell script"
echo " here are the input parameters"
..........................
..................
... (11 Replies)
Discussion started by: gvkumar25
11 Replies
9. Shell Programming and Scripting
Hello all!
I am trying to find the "Notes" backup from my iPhone in my folder ~/Library/Application\ Support/MobileSync/Backup/ which used to be in the sqlite file ca3bc056d4da0bbf88b5fb3be254f3b7147e639c. But since an update of the MacOS it is still there, but not updated anymore. (This is... (9 Replies)
Discussion started by: marek
9 Replies
10. Shell Programming and Scripting
Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried
export OFS="|"; w
but that does not work.
Any ideas? (4 Replies)
Discussion started by: Soham
4 Replies
LEARN ABOUT LINUX
debconf-copydb
DEBCONF-COPYDB(1) Debconf DEBCONF-COPYDB(1)
NAME
debconf-copydb - copy a debconf database
SYNOPSIS
debconf-copydb sourcedb destdb [--pattern=pattern] [--owner-pattern=pattern] [--config=Foo:bar]
DESCRIPTION
debconf-copydb copies items from an existing debconf database into another, possibly new database. The two databases may have different
formats; if so a conversion will automatically be done.
OPTIONS
sourcedb
The name of the source database. Typically it will be defined in your debconf.conf (or .debconfrc) file.
destdb
The name of the destination database. It may be defined in debconf.conf or .debconfrc, or you might define it on the command line (see
below).
-p pattern, --pattern pattern
If this is specified, only items in sourcedb whose names match the pattern will be copied.
--owner-pattern pattern
If this is specified, only items in sourcedb whose owners match the pattern will be copied.
-c foo:bar, --config Foo:bar
Set option Foo to bar. This is similar to writing:
Foo: bar
In debconf.conf, except you probably want to leave off the space on the command line (or quote it: "Foo: bar"). Generally must be used
multiple times, to build up a full configuration stanza. While blank lines are used to separate stanzas in debconf.conf, this program
will assume that "Name:dbname" denotes the beginning of a new stanza.
EXAMPLES
debconf-copydb configdb backup
Copy all of configdb to backup, assuming you already have the backup database defined in debconf.conf.
debconf-copydb configdb newdb --pattern='^slrn/'
--config=Name:newdb --config=Driver:File
--config=Filename:newdb.dat
Copy slrn's data out of configdb, and into newdb. newdb is not defined in the rc file, so the --config switches set up the database on the
fly.
debconf-copydb configdb stdout -c Name:stdout -c Driver:Pipe
-c InFd:none --pattern='^foo/'
Spit out all the items in the debconf database related to package foo.
debconf-copydb configdb pipe --config=Name:pipe
--config=Driver:Pipe --config=InFd:none |
ssh remotehost debconf-copydb pipe configdb
--config=Name:pipe --config=Driver:Pipe
This uses the special purpose pipe driver to copy a database to a remote system.
SEE ALSO
debconf.conf(5)
AUTHOR
Joey Hess <joeyh@debian.org>
2011-06-22 DEBCONF-COPYDB(1)