This may just be a lack of experience talking, but I always assumed that when possible it was better to use a commands built in abilities rather than to pipe to a bunch of commands. I wrote a (very simple) script a while back that was meant to pull out a certain error code, and report back what... (4 Replies)
Hello, this is probably another really simple tasks for most of you gurus, however I am trying to make a script which takes an input, greps a specific file for that input, prints back to screen the results (which are directory names) and then be able to use the directory names to move files.... (1 Reply)
I have a file that is 20 - 80+ MB in size that is a certain type of log file.
It logs one of our processes and this process is multi-threaded. Therefore the log file is kind of a mess. Here's an example:
The logfile looks like: "DATE TIME - THREAD ID - Details", and a new file is created... (4 Replies)
Is there a way I can do this:
search for text and replace line containing matched text with a different line?
For example:
"I want to replace text"
I want to search for replace and then change the line to
I am perplexed.
Hope that makes sense.
Thanks in advance. (4 Replies)
Hi all,
Am writing a ksh script where I am looking for processes that has gone defunct and all of which has the same PPID
PID is the variable that I need to match as this is the process ID of the processes that has gone defunct
Am just curious how come the following DOES NOT work?
ps... (6 Replies)
Hi All. Thanks for your help in advance.
I have a requirement to examine the number of delimiters in each record of a file. If the record has the expected number of delimiters it should be passed into a 'good' file. If it does not, the record should be passed into a 'bad' file. I have been able... (8 Replies)
Hi Friends,
I am using a command that prints certain lines from a file.
For ex:
cat input
abc chr1 456
def chr1 789
ghi chr1 999
jjj chr1 777
jhk chr7 914
My command
awk '{if($2=="chr1" && $3>=456 && $3<=999) {print $0}}' OFS="\t" input
Output being printed is
abc chr1 456 (7 Replies)
Hi,
I am trying to search for a string in a file and print all the matched lines as pipe delimited format.
My command is
cat m_gid_trans.XML|grep -i '<TABLEATTRIBUTE NAME ="Lookup cache directory name"'
The output I am getting is
<TABLEATTRIBUTE NAME ="Lookup cache directory name"... (4 Replies)
What is the correct syntax to pipe or run three awk commands? Basically, using the output of the first awk as input in the second. Then using the output of the second awk in the third. Thank you :).
awk 'FNR==NR {E; next }$3 in E {print $3, $5}' panel_genes.txt RefSeqGene.txt > update.txt |... (3 Replies)