Hi,
I have been trying to find help with my issue and I'm thinking awk may be able to do it.
I have two files eg
file1.txt
STRING1 230 400 0.36
STRING2 400 230 -0.13
STRING3 130 349 1
file2.txt
CUFFFLINKS 1 1394 93932 . + STRING1
CUFFFLINKS ... (9 Replies)
Greetings Experts,
I am in AIX; I have a file generated through awk after processing the input files. Now I need to replace or remove the new-line characters on all lines that doesn't have a ; which is the last character on the line. I tried to use sed 's/\n/ /g' After checking through the... (6 Replies)
Hi,
I have the logs :
cat logsx.txt
744906,{"reportingGroups":,"version":"2.0"}
678874,{"reportingGroups":,"version":"2.0"}
193571,{"reportingGroups":,"version":"2.0"}
811537,{"reportingGroups":,"version":"2.0"}
772024,{"reportingGroups":,"version":"2.0"}... (5 Replies)
Hello,
I need an awk command to print only the lines that match regex on xth field from file.
For example if I use this command
awk -F"|" ' $22 == "20130117090000.*" 'It wont work, I think, because single quotes wont allow the usage of the metacharacter star * . On the other hand I dont know... (2 Replies)
Hi all,
I'm trying to do some work on the authorized_keys file to do a check if there's any information after the hash key.. At the end of the hash key's in the file, there can be an = or ==
Is there a way to check if anything exists after these equals and if so print it out or else print... (2 Replies)
how can i print all the chars of a string one by line?
i have thought that use a for cicle and use this command inside:
${VARIABLE:0:last}but how can i make last? because string is random
P.S. VARIABLE is the string
or can i make a variable for every chars of this string?
this was my idea... (10 Replies)
Hi,
I'm curious about how to do a very simple thing with regular expressions that I'm unable to figure out.
If I want to find out if a string contains 'a' AND 'b' AND 'c' it can be very easily done with grep:
echo $STRING|grep a|grep b|grep c
but, how would you do that in a single... (9 Replies)
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
Hi.
Can I extract the last 3 characters from a given string using sed ?
Why the following doesn't work (it prints the full string) :
echo "abcd" | sed '/\.\.\.$/p' doesn't work ?
output: abcd
Thanks in advance,
435 Gavea. (7 Replies)