All, I apolgize for not replying sooner, for some reason, I was not recieving notification when there were replies..
Here is some more info regarding a larger snippet of the script, with some comments that I hope make it easier to understand:
************************************************
*****************************************************
thx,
SteveT
Last edited by jim mcnamara; 02-27-2012 at 11:09 AM..
Reason: please use code tags so we can read your code
This has the useful side-effect of being able to split columns on its own, without needing cut or awk.
Unfortunately two lines of comments do not clear up 12 different n-long pipe chains.
When you get past the putdowns and sarcasm, Corona688 makes a couple useful points. Thank you for that. I'll try your suggestions in this and future scripts to avoid the pitfalls you mention.
However 2 examples of While read don't actually address the question of why grep -w gives the results it does.
When you get past the putdowns and sarcasm, Corona688 makes a couple useful points.
No putdowns contained, and no sarcasm given. You've simply hit a pitfall so common it has a form-letter.
Quote:
However 2 examples of While read don't actually address the question of why grep -w gives the results it does.
I suspect that it does, actually. for X in `cat file` has bad side-effects including (but not limited to) splitting strings wherever it feels like it, not just at newlines. Meaning, I'm suspicious that you're not grepping what you actually think you are.
You can also try combining the two options:
As others have posted, you need to make the . literal otherwise the IP address may mismatch (. means any character in a regex context). The additional -w option ensures that partial literal matches are excluded...
Hello, :)
I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output :
#!/bin/bash
# PATHS
HOME_BACKUP="/home/backup"
HOME_SCRIPT="/home/scripts/test/backup_server"
TARGET="/var/www"
# DATE
DATE_Ymd=$(date +%Y-%m-%d)
#... (1 Reply)
More issues. The "|" key doesn't work at all, either in the text terminal or in mwm (which starts fine when I do "startx").
How am I supposed to troubleshoot without a "|" key? (2 Replies)
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
totally pis*ed off.
I have a data set (xxx.txt), as follows:
chr1 3821 rs127372 A/C 0.823
chr1 3822 rs127376 A/C/G 0.899
chr1 3722 rs612634 A/C 9.22
chr1 3262 rs7152 A/T 0.22
chr1 3711 rs737 A/C/G 0.2323
.......
I only want to get those lines... (6 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
when i give "ps -elf" or "ps" system gets hung.
if i press "^c" come out from it...
pls help..what should i do to get it resolved.
thanks
CKanth (4 Replies)
How can I configure it?
I have a swedish keyboard with swedish keyboard setting. Everything works perfectly (едц) except that button. What can be wrong?
/Richard
++
NOTE: It seems like the computer notices the input but that the button isn't assigned to anything (the keyboard-cursor stops).... (1 Reply)
I'm using the case statement in the following script and it always takes the "*" default choice while it should be "3".
I wonder why ???
dt_auj=`date +%d`
NBLOG=`ls -al /users/notes01/LOG/t*|awk '{print $7}'|grep $dt_auj|wc -l`
case $NBLOG in
1) cat ~/LOG/console-notes > $fic_tmp1 ;;
2)... (5 Replies)