Jonathan Leffler
Reputation
3,338
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
 Mar12 answered Using gcc documentation Mar5 comment Unix commandline to repeat command with pipes You got my up-vote anyway (y'day) for a not desperately well thought out question. What I had in mind was: myscript "ls -lart" "|grep ^d" "|sed 's/^/ /'", which has 3 arguments. It isn't very sensible; but ignoring the extra arguments on the command line isn't all that sensible. It's tricky. If there is more than one argument to 'myscript', you really should do something with or about the extras. But it is debatable whether the 3-argument command line I showed is really better than just erroring: [ $# -gt 1 ] && { echo "Usage:$0 'command | pipeline'" 1>&2; exit 1; } Mar3 comment Unix commandline to repeat command with pipes Why not 'eval "\$@"' in the script? Mar3 answered Are USB cables device specific? Feb26 comment Documenting Unix commands on the command line @dmckee: When you write 'sh -x', the shell does not do a path-based search for the script - you have to specify the path completely. Feb26 comment Documenting Unix commands on the command line I never had any problems with 'sh -x' on MacOS X 10.5 (or 10.4, ..., or currently on 10.6.2). Which shell are you using? 'sh -x' is common across the majority of shells - I must admit, I was not aware of any that did not support it. Feb25 answered Documenting Unix commands on the command line Feb22 answered Delete matching files in all subdirectories Feb8 answered how to make softlink to bunch of files in one shell comand Feb7 answered Does the order of command options in linux matter? Feb7 comment Why does \rm work but rm doesn't? If it asks you whether to examine the files in '/', do you say 'yes' or 'no'? And does the machine continue to work afterwards? Be very careful about deleting everything under root when running as root; the machine keeps going for a surprisingly long time, but there comes a point at which you have to reboot - off a CD or something similar. Feb6 answered root directory - www or public_html Jan17 comment Multiple Users with owner rights? Note that there's still only one user with owner rights; that's fixed. But that user can give the group members appropriate access rights. Consider using the SGID bit on the directories to ensure that files created in them belong to the same group (the administrators group). Jan16 comment How can I keep a process alive after closing the putty session? Yup - disown looks to be the way to go for an already running job. It's doable because the shell that started the job can manipulate the properties needed. Jan16 comment How can I keep a process alive after closing the putty session? Too late...at least, for normal operations. It wouldn't be altogether surprising to find that if you attach a debugger to the process, and then tweaked it with an appropriate set of system calls, then perhaps you could put it in the background. But it is not what could be recommended - I wouldn't bother, for example, and I have at least some idea of what might be involved. You have two choices now...either stay connected until it finishes, or stop the current process, and restart a new one using nohup. Jan16 comment How can I keep a process alive after closing the putty session? Normally, control-z puts the process into a state of suspended animation; the bg command puts it into the background. However, that also keeps the process attached to the terminal, whereas nohup detaches it from the terminal and therefore allows putty to disconnect and the process to survive the disconnection. Jan14 comment Removing Symantec Antivirus from a Mac? Right click is equivalent to Control-Click - so I can do that, and was able to remove the System Preference items. I found one of the (other) bits of software that I want to get rid of in /Library/LaunchDaemons; I think I found the Symantec ones in /Library/StartupItems - the other directories looked clean. Thanks for the excellent assistance. Jan14 accepted Removing Symantec Antivirus from a Mac? Jan14 asked Removing Symantec Antivirus from a Mac? Jan10 comment Is this a virus? Not sure how to read the source code. This is a txt file Not legible - try indenting (and breaking lines)...