I've below windows batch script which is used to filter the file contents line by line and assign the matched values to the variables in for loop.
I'm trying to write the same code in shell script but nt able to find the relevant functions in shell.Could anyone please help to convert the same code to shell script.It will be of great help
Regards,
Anil
Last edited by Franklin52; 02-17-2014 at 08:38 AM..
Reason: Please use code tags
I am using awk in my .ksh script but when I am trying to run in windows
its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like.
thanx.
#!/bin/ksh
egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Hi,
When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script...
Script:
REM :: File Name : Refresh_OTL.bat
REM :: Parameters : %1 - Region
REM :: : %2 - Cube Type
REM ::... (5 Replies)
Good morning all. I have been running into a problem running a simple gawk script that selects every third line from an input file and writes it to an output file.
gawk "NR%3==0" FileIn > FileOut
I am attempting to run this command from a batch file at the command line. I have several hundred... (6 Replies)
Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below.
I am on a solaris server btw.
Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose.
... (2 Replies)
Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh.
Thanks in advance (2 Replies)
I wish to create a folder on a unix server B from my windows box using windows batch script.
Below is my windows batch script.
@ ECHO OFF
::Enter your Directory name:
echo Enter your Directory name:
set /p mydir=
plink user1@ServerA
mkdir %mydir%
At plink command i get logged... (7 Replies)
Hi all,
i need to run a shell script on remote server. I have created file .bat file in windows server with following code,
c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh
i need to run the script.sh in my remote server
Above command is not working, any... (4 Replies)
Hi team,
My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server.
I have completed the first part i.e From windows to using to unix server with the help of psftp.exe
code:
psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies
LEARN ABOUT PHP
cubrid_schema
CUBRID_SCHEMA(3) 1 CUBRID_SCHEMA(3)cubrid_schema - Get the requested schema informationSYNOPSIS
array cubrid_schema (resource $conn_identifier, int $schema_type, [string $class_name], [string $attr_name])
DESCRIPTION
The cubrid_schema(3) function is used to get the requested schema information from database. You have to designate $class_name, if you
want to get information on certain class, $attr_name, if you want to get information on certain attribute (can be used only with CUBRID_
SCH_ATTR_PRIVILEGE).
The result of the cubrid_schema function is returned as a two-dimensional array (column (associative array) * row (numeric array)). The
following tables shows types of schema and the column structure of the result array to be returned based on the schema type.
Result Composition of Each Type
PARAMETERS
o $conn_identifier
-Connection identifier.
o $schema_type
-Schema data that you want to know.
o $class_name
-Class you want to know the schema of.
o $attr_name
-Attribute you want to know the schema of.
RETURN VALUES
Array containing the schema information, when process is successful;
FALSE, when process is unsuccessful
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 8.3.1 | |
| | |
| | Change return value: when process is unsuccess- |
| | ful, return false, not -1. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
cubrid_schema(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb", "dba");
printf("
--- Primary Key ---
");
$pk = cubrid_schema($conn, CUBRID_SCH_PRIMARY_KEY, "game");
var_dump($pk);
printf("
--- Foreign Keys ---
");
$fk = cubrid_schema($conn, CUBRID_SCH_IMPORTED_KEYS, "game");
var_dump($fk);
printf("
--- Column Attribute ---
");
$attr = cubrid_schema($conn, CUBRID_SCH_ATTRIBUTE, "stadium", "area");
var_dump($attr);
cubrid_disconnect($conn);
?>
The above example will output:
--- Primary Key ---
array(3) {
[0]=>
array(4) {
["CLASS_NAME"]=>
string(4) "game"
["ATTR_NAME"]=>
string(12) "athlete_code"
["KEY_SEQ"]=>
string(1) "3"
["KEY_NAME"]=>
string(41) "pk_game_host_year_event_code_athlete_code"
}
[1]=>
array(4) {
["CLASS_NAME"]=>
string(4) "game"
["ATTR_NAME"]=>
string(10) "event_code"
["KEY_SEQ"]=>
string(1) "2"
["KEY_NAME"]=>
string(41) "pk_game_host_year_event_code_athlete_code"
}
[2]=>
array(4) {
["CLASS_NAME"]=>
string(4) "game"
["ATTR_NAME"]=>
string(9) "host_year"
["KEY_SEQ"]=>
string(1) "1"
["KEY_NAME"]=>
string(41) "pk_game_host_year_event_code_athlete_code"
}
}
--- Foreign Keys ---
array(2) {
[0]=>
array(9) {
["PKTABLE_NAME"]=>
string(7) "athlete"
["PKCOLUMN_NAME"]=>
string(4) "code"
["FKTABLE_NAME"]=>
string(4) "game"
["FKCOLUMN_NAME"]=>
string(12) "athlete_code"
["KEY_SEQ"]=>
string(1) "1"
["UPDATE_RULE"]=>
string(1) "1"
["DELETE_RULE"]=>
string(1) "1"
["FK_NAME"]=>
string(20) "fk_game_athlete_code"
["PK_NAME"]=>
string(15) "pk_athlete_code"
}
[1]=>
array(9) {
["PKTABLE_NAME"]=>
string(5) "event"
["PKCOLUMN_NAME"]=>
string(4) "code"
["FKTABLE_NAME"]=>
string(4) "game"
["FKCOLUMN_NAME"]=>
string(10) "event_code"
["KEY_SEQ"]=>
string(1) "1"
["UPDATE_RULE"]=>
string(1) "1"
["DELETE_RULE"]=>
string(1) "1"
["FK_NAME"]=>
string(18) "fk_game_event_code"
["PK_NAME"]=>
string(13) "pk_event_code"
}
}
--- Column Attribute ---
array(1) {
[0]=>
array(13) {
["ATTR_NAME"]=>
string(4) "area"
["DOMAIN"]=>
string(1) "7"
["SCALE"]=>
string(1) "2"
["PRECISION"]=>
string(2) "10"
["INDEXED"]=>
string(1) "0"
["NON_NULL"]=>
string(1) "0"
["SHARED"]=>
string(1) "0"
["UNIQUE"]=>
string(1) "0"
["DEFAULT"]=>
NULL
["ATTR_ORDER"]=>
string(1) "4"
["CLASS_NAME"]=>
string(7) "stadium"
["SOURCE_CLASS"]=>
string(7) "stadium"
["IS_KEY"]=>
string(1) "0"
}
}
PHP Documentation Group CUBRID_SCHEMA(3)