I tried to set up the script and I am getting teh following error !!!
more script_IPRemove.sh
Code:
#!/usr/bin/ksh -x
infile=./infile
/usr/bin/cp -p $infile $infile.old &&
/usr/bin/awk ' (NR == FNR) { A[$1] next } ($1 in A) { c = 8 } !(c && c--) ' $ipfile $infile.old > $infile
Error that I am getting
--------------------------
Code:
script_IPRemove.sh 1xx.3x.5x.1x
+ infile=./infile
+ /usr/bin/cp -p ./infile ./infile.old
+ /usr/bin/awk (NR == FNR) { A[$1] next } ($1 in A) { c = 8 } !(c && c--) ./infile.old
+ 1> ./infile
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: bailing out near line 1
Last edited by Scrutinizer; 06-21-2014 at 06:05 AM..
Reason: code tags
My application is coded in C++ and uses pro C to get data from oracle database. My executable file is taking more time to execute for some specified input. Is there any way to check where it spends the maximum time? (1 Reply)
Dears,
I need your assistance, I'm creating a shell script to read the IP address of a server and i would like to display an error message in red if the entered value is not an IP. any ideas how can i do it?:confused:
#!/bin/sh
echo "Please enter the server IP address: \c"
read IPadd... (3 Replies)
Can I do something like,
if($0==/^int.*$/) {
print "Declaration"
}
for an input like: int a=5;
If the syntax is right, it is not working for me, but I am not sure about the syntax. Please help.
Thanks,
Prasanna (1 Reply)
I want to write a script that deletes files inside the dir. However, the script
should also allow the user to confirm by pressing (d) key before deleting files..
#!/bin/bash
for file in $1/*
do
size='ls -l $file | cut -f 5 -d " "'
name='ls -l $file | cut -f 9 -d " "'
... (1 Reply)
Hello all!
I need to take a series of inputs passed to one shell script and pass them to a second shell script.
For example, the first shell script, script_one.sh, has the following inputs:
./script_one -u username -p password -option1 string1 -option2 -string2 ....Inside of script_one.sh... (4 Replies)
I need to run sql script from shell script which takes the input from a file and contents of file will be like :
12345
34567
78657
and query will be like :
select seq_nbr from bus_event where event_nbr='12345';
select seq_nbr from bus_event where event_nbr='34567';
select seq_nbr... (1 Reply)
Hi,
I have been thinking of how to script this but i have no clue at all..
Could someone please help me out or give me some idea on this?
I would like to group those lines with the same first variable in each line, joining the 2nd variables with commas.
Let's say i have the following input.
... (3 Replies)
Hello!
My final exam in my Linux class is tomorrow, and I was just reviewing the grep and sed commands. I came across an example, by which I got stumped: it asks to provide a sed command that deletes all lines that contain exactly 3 to 5 digit strings, from a file.
In this case, I created a... (3 Replies)
Hello,
I have a SAS code that predominantly has comments line and the real code like below and i want to remove ONLY THE COMMENTS from the code in the single line or spanned across multiple lines.
/********************************************************************
*** This Is a Comment... (4 Replies)
Discussion started by: arooonatr
4 Replies
LEARN ABOUT DEBIAN
dxf2vrml
DIME(1) General Commands Manual DIME(1)NAME
dxf2vrml - program to convert .dxf formatted 3-D datasets to .VRML format.
SYNOPSIS
dxf2vrml [infile][-ooutfile][-emaxerr][-f][-l]
DESCRIPTION
This manual page documents briefly the dxf2vrml command. (default infile is stdin, default outfile is stdout) This manual page was written
for the Debian GNU/Linux distribution because the original program does not have a manual page. Instead, it has documentation in the GNU
Info format; see below.
dxf2vrml is a program that...
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below. For a complete description, see the Info files.
infile default infile is stdin
-o outfile,
default outfile is stdout
-e, Maximum error when tessellating curves
-f, Respect the $FILLMODE header variable
-vrml2,
Write as vrml2. Default is vrml1
-l, Use layer color, ignore the color index
-s, Set sub parameter
-h, Show useage.
SEE ALSO
files in: /usr/share/doc/libdime/, /usr/share/doc/libdime-dev/.
The programs are documented fully by http://www.coin3d.org/lib/dime/, available via the Internet.
AUTHOR
This manual page was written by A. Maitland Bottoms <bottoms@debian.org>, for the Debian GNU/Linux system (but may be used by others).
January 11, 2002 DIME(1)