08-16-2007
Quote:
Originally Posted by
lorcan
Perdarabo has hardcoded the input file as data(3rd line) in the code, So copy your input file as data and then try this script.
or change the line
exec < data
to
exec < testingdata.txt
or change it to:
exec < $1
and then pass the name of file as an argument
or eliminate the line entirely and redirect the input
10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
Here's my problem:
I have a laptop running Windows XP Pro with no internal CD or Floppy drives. I want to install Linux on it. I don't care about the Windows XP Pro installation, in fact I would like to install Linux over the entirety of the HD. However I cannot boot from any external CD drive... (1 Reply)
Discussion started by: saabir
1 Replies
2. Shell Programming and Scripting
Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this:
|NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL|
There should be 52 fields per line.
I would like any occurrence of | NULL| or |NULL| to appear as '||'
Currently I am using this sed... (2 Replies)
Discussion started by: bestbuyernc
2 Replies
3. Shell Programming and Scripting
Hi,
I'm in the midst of writing a UNIX script that sftp's files to an external host and am stuck with a problem. The problem is that the files created on my server as a order number that correlates to a sequence of directories on the remote host which is where the file should be ftp'ed.
... (3 Replies)
Discussion started by: budrito
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am at a point in my script where I defined the number of the command line parameter I would like to set a variable equal to:
parameter_number=14
I would then like to set a variable equal to the correct parameter:
variable=$parameter_number
The issue here is that {} is required... (2 Replies)
Discussion started by: msb65
2 Replies
5. Shell Programming and Scripting
So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour.
I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Discussion started by: kungfujoe
5 Replies
6. Shell Programming and Scripting
Hi, I have a requirement in which i have to read a csv file and put data in certain set of variables:
File content:
VP-DTL-REC-CNT, ,854840,0.00,VP-PAID-AMT, ,0,32280885.17,VP-PAT-PAID-AMT, ,0,9930244.32,VP-PAID-REV-CNT, ,484927,0.00,VP-REJ-CNT, ,369913,0.00, , ,0,0.00, , ,0,0.00, , ,0,0.00, ,... (3 Replies)
Discussion started by: shantoshkumar
3 Replies
7. Shell Programming and Scripting
Hi everyone..
I am new here, hello.. I hope this doesn't come across to you folks as a stupid question, I'm somewhat new to scripting :)
I'm seeking some help in finding a way to manipulate data output for every two characters - example:
numbers.lst contains the following output:... (3 Replies)
Discussion started by: explicit
3 Replies
8. Solaris
Hi folks!
My first post here.
I'm working on a script that retrieves a range of files from a list depending on a range of time.
UPDATE:
I've seen it could be difficult to read all this thing, so I'll make a summarize it..
How come I do this and take a result..
grep "..\:.." lista.new |... (4 Replies)
Discussion started by: kl0x
4 Replies
9. Shell Programming and Scripting
Hi All
I need to put some sed together for a task and its a bit advanced for me, so I thought I'd ask if anyone here could help.
I have a csv file with content like this -
"","abcde","",""
"'","abcde","",""
"","","","1234"
"'e'","","",""
I need to remove any single quotes that fall... (17 Replies)
Discussion started by: steadyonabix
17 Replies
10. Shell Programming and Scripting
Hi,
i am new to linux programming fraternity but looks like starting with a big thing...
yes..xml parsing (it is indeed tough for a beginner like me) so need your kind help...
The snippet of xml looks like:
<snapshot>
<tag1>
<key>1234</key>
<keytype>abcd</keytype>
</tag1>
<tag2>... (11 Replies)
Discussion started by: rookie2014
11 Replies
LEARN ABOUT DEBIAN
dh-exec-subst
DH-EXEC-SUBST(1) dh-exec DH-EXEC-SUBST(1)
NAME
dh-exec-subst - Debhelper executable file substition scripts
SYNOPSIS
#! /usr/bin/dh-exec
src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/
DESCRIPTION
Being a sub-command of dh-exec(1), this program must not be ran directly, but through dh-exec, which automatically runs all available
sub-commands if run bare; or explicitly with dh-exec --with=subst.
It is a wrapper around the various other substitution helpers, and will pipe the input file through all the available substitution helpers.
It is up to these scripts to do the actual work.
When a helper fails to expand a variable within its input, it will leave it as-is, so that later in the pipeline it can perhaps be expanded
by another program.
SCRIPTS
dh-exec-subst-env
Substitutes any of the available, exported environment variables into its input. It does not do any kind of filtering: whatever is
available in the environment, will be available for substitution, however unsafe that may be.
dh-exec-subst-multiarch
Attempts to expand any of the variables known to dpkg-architecture(1), mostly useful for multi-arch support.
The command will query dpkg-architecture(1) directly, and does not rely on environment variables set (as the called program will
prefer already set environment variables anyway).
ENVIRONMENT
DH_EXEC_SCRIPTDIR
Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in
/usr/share/dh-exec/.
FILES
$DH_EXEC_SCRIPTDIR/dh-exec-subst-*
The various scripts for the higher-level program.
SEE ALSO
debhelper(1), dh-exec(1)
AUTHOR
dh-exec-subst is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>.
2012-05-03 DH-EXEC-SUBST(1)