This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (( num=1; num<=5; num++ )); do printf "%02d\n" $num; done | |
seq -f '%02g' 1 5 | |
for num in $( seq -w 01 05 ); do echo $num; done | |
// from bash 4.0 onward | |
echo {01..05} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat somecommand.sh | |
#! /usr/bin/bash | |
ARG1=${1:-foo} | |
ARG2=${2:-bar} | |
ARG3=${3:-1} | |
ARG4=${4:-$(date)} | |
echo "$ARG1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var header = [ "h1", "h2", "h3", "h4" ]; | |
var col1 = [ 11, 12, , 14 ]; | |
var col2 = [ 21, 22, 23, 24 ]; | |
var col3 = [ 31, , 33, 34 ]; | |
var col4 = [ 41, 42, 43, 44 ]; | |
var col5 = [ 51, 52, 53, ]; | |
function sortWords() { | |
columns = ( arguments[0].length ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countTABLE( table, query ) { | |
var fTABLE = new SCFile( table, SCFILE_READONLY ); | |
var rc = fTABLE.doSelect( query ); | |
if ( rc == RC_SUCCESS ) { | |
do { | |
print(fTABLE.id+ "_"+fTABLE.name); | |
} while ( fTABLE.getNext() == RC_SUCCESS ) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -t nfs effectivedisk.eg.office:/volume3/EffectiveInstall /mnt/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net start | findstr HP | |
netsh interface show interface | |
net stop "HP Service Manager 9.40 Server" | |
netsh interface set interface "Ethernet1 2" admin=disable | |
net start "HP Service Manager 9.40 Server" | |
netsh interface set interface "Ethernet1 2" admin=enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select password from dbo.OPERATORM1 where name='flex' | |
update dbo.OPERATORM1 set password='=SH524DB92E55E5BD4437C0DCD6F73BF4FF534A1F2306B0CAF098FF13B140D8E202EB10C5A07F84230CB212564109BD6AD99566E0C3326638EE170C7B637FB3F31E1512=' where name='flex'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE CURSOR c_drop IS | |
SELECT table_name | |
FROM dba_tables | |
WHERE owner = '<sm séma neve>'; | |
v_sql VARCHAR2(800); | |
BEGIN | |
FOR r IN c_drop | |
LOOP | |
v_sql := 'DROP TABLE '|| r.owner||'.'|| r.table_name||' cascade constraints' to prx_test'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'drop table', name, ';' FROM sysobjects WHERE xtype='U' order by name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlplus / as sysdba | |
create user smadmin identified by smadmin default tablespace users quota unlimited on users; | |
alter user smadmin default tablespace users; | |
alter user smadmin temporary tablespace temp; | |
alter user sys identified by password; | |
grant create materialized view TO smadmin; | |
grant create session ,alter session ,create synonym ,create view ,create table ,create sequence TO smadmin; |