10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
ping www.google.com | awk 'BEGIN{FS="+";}{if ($10 ~ (/^$/) || (/^\.?/)) print "SLOW"; else print $0}
output
awk: warning: escape sequence `\=' treated as plain `='
PING www.google.com (xxx.xxx.xxx.xxx) 56(84) bytes of data.
64 bytes from xxx.xxx.xxx.xxx icmp_req=2 ttl=128... (3 Replies)
Discussion started by: Apollo
3 Replies
2. Shell Programming and Scripting
I've found this script which seems very promising to solve my issue:
To search and replace many different database passwords in many different (.php, .pl, .cgi, etc.) files across my filesystem.
The passwords may or may not be contained within quotes, single quotes, etc.
#!/bin/bash... (4 Replies)
Discussion started by: spacegoose
4 Replies
3. Shell Programming and Scripting
I do have a shell file where I call many unix commands . I would like to add a regular expression step in that shell file, where a text file, say Test.txt has to be openned and all the :'s should be replaced.
Basically apply the follwoing regular expression:
:%s/://g
to that particular text... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
4. UNIX for Advanced & Expert Users
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
5. Shell Programming and Scripting
hi
i am trying to extract some specific data out of a text file using regular expressions with shell script
that is using a multiline grep .. and the tool i am using is pcregrep so that i can get compatibility with perl's regular expressions
for a sample data like this, i am trying to grab... (6 Replies)
Discussion started by: vemkiran
6 Replies
6. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
7. Shell Programming and Scripting
Hi ,
I am having an issue with the Awk script to insert newline for a regular expression match
Having a file like this
FILE1
####################
RXOER , RXERA , RXERC , RXERD
.RXEA(RXBSN), RXERD , REXCD
input RXEGT
buffer RXETRY
#######################
Want to match the RXE... (38 Replies)
Discussion started by: jaita
38 Replies
8. Shell Programming and Scripting
Hi I am having a file as shown below
FILE 1
TXDD00, TXDD01, TXDD02, TXDD03,
TXDD04, TXDD05, TXDD06, TXDD07,
TXDD08, TXDD09, TXDD10, TXDD11,
TXDD12, TXDD13, TXDD14, TXDD15,
TXDD16, TXDD17, TXDD18, TXDD19,
TXDDCLK, TXDJTAGAMPL0, TXDJTAGAMPL1,... (3 Replies)
Discussion started by: jaita
3 Replies
9. Shell Programming and Scripting
Hi,
I have script which will take a string as input and search in a file.
But when I want to search a pattern which has special characters script is ignoring it.
For example: I want to search a pattern "\.tumblr\.com". shell script is removing \ (backslah) and trying to search... (7 Replies)
Discussion started by: Anjan1
7 Replies
10. Shell Programming and Scripting
I want to check if the first argument of my shell script starts with a specifiec string?
Any Idea??
Thank u (3 Replies)
Discussion started by: andy2000
3 Replies