User Tools

Site Tools


linux:bash:command

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:bash:command [2016/12/11 23:02] – [Bash Loop From LS] kbadminlinux:bash:command [2023/06/06 06:06] (current) kbadmin
Line 38: Line 38:
 atau anda bisa menyimpan command di dalam string kemudian mengeksekusi dengan eval. contoh seperti ini. atau anda bisa menyimpan command di dalam string kemudian mengeksekusi dengan eval. contoh seperti ini.
 <code> <code>
-command='ls -1tr  $task_file  --ignore=auto* | head -3'+ 
 +command=ls -1tr  $task_file  --ignore=*.auto | head -3
 if [[ -z $command ]]; then if [[ -z $command ]]; then
-        command='ls -1tr  $task_file | head -3'+        cmd='ls -1tr  $task_file | head -3' 
 +else 
 +        cmd='ls -1tr  $task_file  --ignore=*.auto | head -3'
 fi fi
  
  
-for task in $(eval $command); do+for task in $(eval $cmd); do
 ... ...
 ... ...
Line 50: Line 53:
 </code> </code>
  
 +===== TOP -c command =====
 +Top menampilkan proses linux filter berdasarkan command
 +<code>
 +top -bc |grep name_of_process
 +</code>
 +sumber : http://stackoverflow.com/a/24273554
  
 +===== Mendapatkan Lokasi Path Saat ini - Current Working Path  =====
 +Berikut ini adalah command bash untuk mendapatkan lokasi pointer saat ini
 +<code>
 +$ echo "$PWD"
 +</code>
  
  
  

Layanan

Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |
linux/bash/command.1481515353.txt.gz · Last modified: 2016/12/11 23:02 by kbadmin

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki