i have a source file and have 3 columns and separated by "|" .i want to split this 3 columns in different variable.When i am executing this values indivisually giving correct result but when the same execute inside a for loop,it's giving issues.
Src file(jjj.txt)
-------
Without Loop
-------------
But the same in for loop not working ....giving biased result
not working.....any help?
Last edited by Scrutinizer; 12-03-2016 at 09:24 PM..
Reason: code tags
I have a command nested in some while loops to parse some data that looks something like this.
while ($condition)
while ($condition)
...
gzcat /dir/$fileName.gz | grep $searchString > out_file
end
end
On the first loop, the command is executed properly (and takes maybe 10... (3 Replies)
i have a line like this in my script
IP=`get_IP <hostname> | awk '{ print $1 }'
echo $IP
the problem is get_IP <hostname> returns data formated as follows:
ip 1.1.1.1 name server_name
the code above returns
1.1.1.1 server_name and i just need the 1.1.1.1
I have tried to add "|... (5 Replies)
Hi I am using a awk command but not getting required o/p.
input file
a.txt
2 ak
3 cb
4 de
5 gh
6 ij
awk program
BEGIN { x=0 }
{if ($1>3) {x=x+1}{print $0} }
END { print "I found " x " line have value more than 3" }
output
2 ak
3 cb
4 de
5 gh
6 ij (3 Replies)
Hello,
Recently, I've started with shell scripting, and decided to write a script for my system backup using tar. When I was dealing with tar execution inside shell script I found this, inside shell we have the following code:
tar $TAR_PARAMS $ARCHIVE_FILE $EXCLUDE $BACKUP_STARTwith... (6 Replies)
Hey everyone
I have a file 'agenda' which contains:
Object Day Month Year
Birthday 09 02 2012
i want to extract from a script the line which contains the day the user typed.
for example if he type 09 the line is showed using... (4 Replies)
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
Hello,
There is a process in AIX which is actually a oracle database user session but is running very slow When I use lsof it give below output
lsof /proc/21955180
In while loop:256
In while loop:256
In while loop:256
In while loop:256
Value of I :183 np:1024
Please... (1 Reply)
#!/bin/sh
# This script returns the number of rows updated from a function
echo "The execution is starting ....."
sqlplus -silent $UP <<EOF
set serveroutput on
set echo off
set pagesize 0
VAR no_rows_updated NUMBER;
EXEC :no_rows_updated :=0;
DECLARE
CURSOR c_update is
SELECT * FROM... (4 Replies)
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
LEARN ABOUT PHP
odbc_specialcolumns
ODBC_SPECIALCOLUMNS(3) 1 ODBC_SPECIALCOLUMNS(3)odbc_specialcolumns - Retrieves special columnsSYNOPSIS
resource odbc_specialcolumns (resource $connection_id, int $type, string $qualifier, string $owner, string $table, int $scope, int
$nullable)
DESCRIPTION
Retrieves either the optimal set of columns that uniquely identifies a row in the table, or columns that are automatically updated when
any value in the row is updated by a transaction.
PARAMETERS
o $connection_id
-The ODBC connection identifier, see odbc_connect(3) for details.
o $type
- When the type argument is SQL_BEST_ROWID, odbc_specialcolumns(3) returns the column or columns that uniquely identify each row
in the table. When the type argument is SQL_ROWVER, odbc_specialcolumns(3) returns the column or columns in the specified table,
if any, that are automatically updated by the data source when any value in the row is updated by any transaction.
o $qualifier
- The qualifier.
o $owner
- The owner.
o $table
- The table.
o $scope
- The scope, which orders the result set.
o $nullable
- The nullable option.
RETURN VALUES
Returns an ODBC result identifier or FALSE on failure.
The result set has the following columns:
oSCOPE
oCOLUMN_NAME
oDATA_TYPE
oTYPE_NAME
oPRECISION
oLENGTH
oSCALE
oPSEUDO_COLUMN
PHP Documentation Group ODBC_SPECIALCOLUMNS(3)