• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
 
 
:
 

 

 
- 2005-2006 -
 
 

 

 

shell scripts ;

shell script

 

 

 

 

 

 

 

 

.

 

shellscipt

 

 

 

 

 

 

 

:
#!/bin/bash

 

 

 

 

(bash).
!
 

 

 
!
 

 

test.sh

 

 

 
"
 

 

 

:
#!/bin/bashE#mkdir testcp .login testecho “h antigrafh egine”
#$
 

 
!
 

 

755

 

 

 root
 
./test.sh
 

 

 

 

 

:

 
!
 

 

test

 

 

 

.login

 

test

 

 
"
: H antigrafh egine
$
:
 
:
 %"
 

 

 

 

 

 

 
!
 

 

 

 

 

.

 

 

 

 

 

 

 

.X=”abc”

 

 

 

 

 

 

.echo $X .
 &
 

 
"
:
#!/bin/bash$
'
=“ABC”Eecho “$X” # kalo einai ean prokeitai gia metavlith keimenoy nax#xrhshmopoiounatai eisagwgika
 %
 

 ABC. 

 
(
 

 echo 

 

 

 

 

 

 

 
"
.
 &
 

echo –e

 

 

 

 

 

:
 
To
 \
n

 

 
 

 \t
"
 

 

tab
 
 
To
\b

 

 

 backspace
 

To
echo –e “12\t3\n456\b” 

 
!
:
12 345
 
K

 

 

 

 

 
""
 

 

 

 
"
:
!
 
#!/bin/bashecho "Gia sou , $USER. Tha sou kanw mia lista me ta arxeia sou"echo "Sou kanw lista me ta arxeia tou fakelou, $PWD"ls
 %
$USER

$PWD

 

 

.
)
 

 

 

 

 

:
System Variable Meaning
BASH=/bin/bash

 

 

shell

 BASH_VERSION
(
 
!
 

shell

 HOME

home directory

 PATH=/usr/bin:/sbin:/bin:/usr/sbin
*!
 

 

 

 PWD
)
 

 

 
!
 

 SHELL=/bin/bash

 

 

shell

 USERNAME

 

 
"
 

 

 

 
!!
 O
 

 

 

 

 

 

 

 
 

 

 

 

 
 

 

 

 

 

 

 
"
:
!
 #!/bin/bash$
#
=”ls”$B=”-l”echo “$
#
$
+
*.exe"
#
 
!
:ls –l *.exe

 

 

:
 

 

 

 

 

 

 

 

 

 

 

:
metavlhth="$(entolh)"

x=”$(ls)
 

 

 

 

 

 

 

 

ls.
 

 

 

 

 

 

 

 

 

 

 

 

 

redirect

.
$ls>test.txt
 

 

 

 

ls

 

 

 
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...