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
##!/bin/bash | |
file1="index.html" | |
file2="old_index.html" | |
link_file1="link" | |
link_file2="old_link" | |
clear | |
#downloading index.html |
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
%{ | |
/* | |
1.Request input of an even and an odd number | |
2.indicate input characteristic : Even/Odd | |
3.check for input's correctness and print result | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> |
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
/* Declarations */ | |
%% | |
/* Rules */ | |
%% | |
int yywrap() | |
{ |
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
{% | |
#include <stdlib.h> | |
#include <stdio.h> | |
%} | |
number [0-9]+ | |
%% | |
{number} {printf("Found : %d",atoi(yytext));} |
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
%{ | |
/* Scan and return a token for identifiers of the format : | |
string number | |
Note: strings are not case sensitive | |
Examples: a0 , A1 , ab2 , AB4 , aBc5 | |
*/ |
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
/* Declarations */ | |
%% | |
/* Rules */ | |
%% | |
main(int argc, char* argv[]) | |
{ | |
if(argc > 1) | |
{ |
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
/* Declarations */ | |
%% | |
{number} {return atoi(yytext);} | |
%% | |
int main() | |
{ |
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
#!/usr/bin/expect -f | |
# | |
#credits: http://casual-effects.blogspot.in/2013/05/ssh-with-command-line-password-on-os-x.html | |
set host "host" | |
set password "password" | |
spawn ssh $host | |
expect { |
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 file | ssh -p [port] user@host "cat > remotefile" |
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
#!/usr/bin/expect -f | |
set host "host" | |
set password "password" | |
spawn ssh $host | |
expect { | |
"(yes/no)?" { | |
send -- "yes\r" |
OlderNewer