Revision [1304]

Last edited on 2011-01-18 13:00:24 by OsdeInfo
Additions:
BashRedirects


Revision [1301]

Edited on 2011-01-18 12:59:16 by OsdeInfo
Additions:
BashArithmetic
BashVariables


Revision [1299]

Edited on 2011-01-18 12:52:24 by OsdeInfo
Additions:
workgroup = MYGROUP
server string = Samba Server
printcap name = /etc/printcap
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
comment = Home Directories
browseable = no
writeable = yes
==See Also==
GnuAwk
GnuDiff
GnuSed
Deletions:
workgroup = MYGROUP
server string = Samba Server
printcap name = /etc/printcap
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
comment = Home Directories
browseable = no
writeable = yes
See GnuAwk GnuDiff GnuSed


Revision [779]

Edited on 2006-11-16 16:56:12 by OsdeInfo
Additions:
See GnuAwk GnuDiff GnuSed


Revision [766]

Edited on 2006-11-16 08:57:21 by OsdeInfo
Additions:
piping output from grep to cut to sed to awk


Revision [757]

Edited on 2006-11-02 12:44:35 by OsdeInfo
Additions:
cat "$vm" | grep scsi | grep name | cut -d "=" -f 2 | sed 's/"//g' | awk -F":" ' { print $NF } '
Deletions:
cat "$vm" | grep scsi | grep name | cut -d"=" -f2 | sed 's/"//g' | awk -F":" ' { print $NF } '


Revision [756]

Edited on 2006-11-02 12:44:10 by OsdeInfo
Additions:
$ ls | while read -r f ; do ls -ld "$f" ; done
Deletions:
%%(sh)
ls | while read -r f ; do ls -ld "$f" ; done


Revision [755]

Edited on 2006-11-02 12:43:05 by OsdeInfo
Additions:
%%(bash)
%%(bash)


Revision [754]

Edited on 2006-11-02 12:42:31 by OsdeInfo
Additions:
%%(sh)


Revision [753]

Edited on 2006-11-02 12:42:14 by OsdeInfo
Additions:
== logfile analysis
$ grep -v '^#' *.log | cut -d " " -f 5,15 | grep "osde.info"


Revision [694]

Edited on 2006-09-13 08:00:40 by OsdeInfo
Additions:
==bash initialisation==
When bash starts it first runs
BashRc
==bash options==
==bash for loop==
==bash arithmetic==
==bash quoting quotes & backslashing backslashs==
==bash while==
==bash strip comments==
==bash piping==
----
REFERRERS
{{backlinks}}
Deletions:
Bash Options
For loop
Add one
Double up backslashes
Composite


Revision [339]

Edited on 2005-11-18 10:46:05 by OsdeInfo [added composite example]
Additions:
cat "$vm" | grep scsi | grep name | cut -d"=" -f2 | sed 's/"//g' | awk -F":" ' { print $NF } '
Deletions:
ls /vmfs/vdisk > allvmdks
cat "$vm" | grep scsi | grep name | cut -d"=" -f2 | awk -F":" ' { print $NF } '


Revision [338]

Edited on 2005-11-18 10:27:29 by OsdeInfo [added composite example]
Additions:
Composite
ls /vmfs/vdisk > allvmdks
vmware-cmd -l | while read -r vm
do
cat "$vm" | grep scsi | grep name | cut -d"=" -f2 | awk -F":" ' { print $NF } '
done


Revision [337]

Edited on 2005-11-18 09:30:57 by OsdeInfo [added composite example]
Additions:
Bash Options
$ for f in $(ls); do echo $f ; done
$ for f in /etc/sysconfig/*; do echo $(dirname $f) ; done
$ for f in /etc/sysconfig/*; do echo $(basename $f) ; done
$ x=1 ; x=$(($x+1)); echo $x
Double up backslashes
$ ls | sed "s/\\\\/\\\\\\\\/g"
Iterate through file names and paths with spaces and backslashes
ls | while read -r f ; do ls -ld "$f" ; done
Deletions:
Options
for f in $(ls); do echo $f ; done
for f in /etc/sysconfig/*; do echo $(dirname $f) ; done
for f in /etc/sysconfig/*; do echo $(basename $f) ; done
x=1 ; x=$(($x+1)); echo $x


Revision [336]

Edited on 2005-11-18 08:32:58 by OsdeInfo [added composite example]
Additions:
for f in /etc/sysconfig/*; do echo $(dirname $f) ; done
for f in /etc/sysconfig/*; do echo $(basename $f) ; done
Add one
x=1 ; x=$(($x+1)); echo $x


Revision [335]

Edited on 2005-11-18 06:24:04 by OsdeInfo [added composite example]
Additions:
For loop
for f in $(ls); do echo $f ; done


Revision [334]

Edited on 2005-11-18 06:20:52 by OsdeInfo [added composite example]
Additions:
===bash===
Options
...
Remove comments and blank lines
$ cat smb.conf | grep -v '^#' | grep -v '^;' |grep -v '^$'
[global]
workgroup = MYGROUP
server string = Samba Server
printcap name = /etc/printcap
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
[homes]
comment = Home Directories
browseable = no
writeable = yes
Deletions:
interactive-comments on
keyword off
monitor on
noclobber off
noexec off
noglob off
nolog off
notify off
nounset off
onecmd off
physical off
pipefail off
posix off
privileged off
verbose off
vi on
xtrace off


Revision [333]

The oldest known version of this page was created on 2005-11-18 06:09:39 by OsdeInfo [added composite example]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki