extract field How can I extract the number from this line? <process_id>25752</process_id> I want to extract "25752" regards ... 9 May 2010 02:30
crontab environment problem I wrote a small csh script (on Linux) to run "make" (compile a program). It works fine when I run it from the command line, but when I try to run it with crontab, it doesn't work. I set the PATH variable in the crontab file so it can find the script, but other environment variables are apparently missing. How can I... 10 May 2010 17:39
Copy multiple datasets using Orchadmin(Data Stage utility) Hi, I am trying to copy multiple datasets(which satisfies a criteria) to another directory. I am using below command: find <Source_directory_name> -mtime +7 -type f -name "*.ds"| xargs -i orchadmin cp {} <destination_dir_name> Im getting below error: ##I TUTL 000031 03:11:11(001) <main_program> The open fi... 6 May 2010 10:46
Have /etc/sudoers entry, but still getting prompted for a pw. Why? On 2010-05-05, laredotornado <laredotornado(a)zipmail.com> wrote: Hi, I"m using Mac 10.6.3. I have added this entry to my /etc/sudoers file ... davea ALL = NOPASSWD:APACHECTL and (when logged in as "davea"), I have this entry in my ~/.bash_profile file ... alias restart='sh ~/Tomcat/bin/r... 5 May 2010 21:36
find with -perm /u+w Hi All On two different Linux boxes, the find have different behavious. What gives? What alternative I can use on machineA whose find does not understand -perm /u+w ? $ uname -a Linux machineA 2.6.5-7.282-bigsmp #1 SMP Tue Aug 29 10:40:40 UTC 2006 i686 i686 i386 GNU/Linux $ /usr/bin/find --version GNU find ... 5 May 2010 21:36
Have /etc/sudoers entry, but still getting prompted for a pw. Why? Hi, I"m using Mac 10.6.3. I have added this entry to my /etc/sudoers file ... davea ALL = NOPASSWD:APACHECTL and (when logged in as "davea"), I have this entry in my ~/.bash_profile file ... alias restart='sh ~/Tomcat/bin/restart.sh; sudo /usr/sbin/apachectl restart' However when I run the "restart" c... 5 May 2010 09:19
Displaying directory structure at command prompt Hi, In my terminal, the command prompt doesn't show its present directory,i.e. the only prompt which comes irrepective of wherever I am is user(a)lin1-100> Is there any way I can appear the current directory also appear along with this prompt like user(a)lin1-100 /proj/cpp/sort/> Thanks Unix baby ... 10 May 2010 19:53
Use a clever "grep" or other command Hi All, I have a file with the folloing format: <date> <time> <message> and I need to get all the lines from a given date < e.g. 2010-04-27> and a given time and up <e.g. 03:20:00> For example: I have the following file: 2010-04-19 07:27:56.795 Error. 2010-04-27 02:19:04.158 2 message. 2010-04-27 03:01... 3 May 2010 12:02
find: -exec: no terminating ";" or "+" Hi, I'm using Mac 10.6.3 and trying to write a shell script that will execute a find function. Here is my script ... #!/bin/sh pattern=$1 shift find "$@" -exec grep -i "$pattern" /dev/null {} But upon executing, ../myfind.sh "hello" ~/Tomcat I get this error. What do I need to correct in my shell s... 2 May 2010 13:08
reading file into array Dear all, I've the following script below to read a given file. When I try to access a given element, once the loop has finished, the array seems to be empty. Any suggestions on that? i=0 input=[] grep "car" ${myfile} | while read line; do input[i]="$line"; echo ${input[$i]} i=$((i + 1)) done echo ${i... 30 Apr 2010 17:25 |