6,248 reputation
723
bio website timkennedy.net
location Virginia
age 43
visits member for 3 years, 9 months
seen yesterday
Father, Husband, SysAdmin, Brother, Son. In reverse chronological order.

1d
comment Help in starting learning bash script
The backslashes are used in a case like this for escaping newline characters. Thus, telling the shell interpreter to read the lines ending in \ as a single long line. Having the backslashes in between arguments in the shell doesn't really matter, as you're only escaping the space character following them. It just makes it harder to read.
1d
comment Help in starting learning bash script
Yes. That's pretty much it. afile="/some/path/to/A.IndelRealigner.intervals". Then in both commands, substitute that variable. First command: -o $afile. Second command: -targetIntervals $afile. Then do the same with the other variables that are used twice.
2d
comment Help in starting learning bash script
And why do you have all the extra "\" backslash characters?
2d
comment Help in starting learning bash script
A bash script like the one you have above is a procedural script. That is, the first command runs, and when it is finished, the second command runs. There is no explicit passing of data from the first to the second, other than what is written to files by the first, and read from the same files by the second. Depending on what output you need passed to the first one, there are a number of ways to do that, such as capturing output in a variable in the script, and using that variable in subsequent commands, or using pipes (cmd1 | cmd2) where STDOUT of cmd1 is passed to STDIN of cmd2
Aug
6
comment Debugging a Solaris network issue
Those port 53 queries you see in netstat -an are just your fileserver trying to do DNS lookups.
Jun
20
comment Script runs manually but not from cron
Sorry. I meant to say a reduced environment. Cron often doesn't run script with the same environment a user would get in an interactive shell.
Jun
19
comment Script runs manually but not from cron
Thanks, @l0b0 . I guess it just looks funny to me. :)
Jun
16
comment Disallow Changing of Passwords
good suggestion! using a VM in this way would provide a good learning environment.
Jun
16
comment Where should I place my websites files with multiple vhosts?
While the answers are correct that it doesn't really matter where you put them, I would offer that /var/www/site1, /var/www/site2 is a widely used convention that will be familiar to many folks, so standardizing there can be beneficial.
Jun
16
comment Disallow Changing of Passwords
There's really no truly functional way, without going down the rabbit hole of all possible commands, since you have to exclude commands you don't want a user to run, rather than having to specifically include commands they are allowed to use. Meaning you have to prevent things like 'sudo bash' followed by 'passwd root', and if you disallow '/bin/bash', you have to catch 'sudo cp /bin/bash /tmp/bash ; sudo /tmp/bash'.
Jun
16
comment Renaming files with its path name
Thanks, @Graeme. Yet another interesting tool I was unfamiliar with. :)
Jun
16
comment Renaming files with its path name
I like this, but only my linux box has prename. Not on the Mac, nor on Solaris. Interesting tool, though, thanks for introducing it to me.
Dec
25
comment How does the piping in this command ultimately achieve to kill the process?
actually xargs will batch the commands into groups of 50 or so, so it runs kill 1 1804, and if there were more than 50 PIDs, it would execute more batches. This is why it can be beneficial to do ls | xarg -iz rm z instead of deleting files one by one.
Dec
25
comment Is there any point in using `sudo` when you are the sole user of your machine?
Also, the use of sudo increases the likelihood that you remain the only user of your computer.
Dec
22
comment Gives access to root user for a period of time
Does the user require root access? Or just elevated privileges for specific tasks? As @Gilles mentioned, once you give someone root, there's really no way to guarantee that you can take it back. You'd be better served putting the effort into designing a role account, or a sudo profile that provides exactly the required privileges, with nothing extra.
Dec
16
comment iSCSI device mapped to different SCSI device
This OP's question wasn't really what I was looking for, but this answer turned out to be the answer I needed. Thank you.
Nov
14
comment Is it possible to find out what program or script created a given file?
Sorry. site got hacked, and was down for a while. new page is at timkennedy.net/2010/12/logging-shell-commands-to-syslog-on.html
Aug
27
comment Solaris 11: Accessing a pool on disk from live DVD?
Glad to hear it. :)
Aug
20
comment How to increase the system CPU load/utilization in Solaris 10 to test nagios?
some solutions are here: stackoverflow.com/questions/2925606/…
Aug
16
comment $PWD variable equivalent of pwd -P
some shells support $(pwd -P) syntax, as opposed to back ticks, but I don't think (t)csh is one (or two) of them. Also, for why you shouldn't script in (t)csh, see: shlomifish.org/open-source/anti/csh