Thank you very much Agama, this worked perfectly!!
---------- Post updated at 10:51 AM ---------- Previous update was at 10:47 AM ----------
Thank you very much Agama, this worked perfectly!!!
-----------------------------------------------------
Quote:
Originally Posted by agama
No, I think that rdcwayx was giving an example of how you might go about it using the echo as a sample for testing.
I think this is the most straight forward way:
This will match everything from the beginning of the line to the first comma (the 10 digit number) and replace it with 'aaaaaaaaaa' You can replace the string of a's with what ever you need.
---------- Post updated at 10:53 AM ---------- Previous update was at 10:51 AM ----------
Thanks to everyone who provided input and new knowledge.
Is there a simple way of determining whether a command line arguement is numeric or not?? I tried a search and didn't find anything similar...
This is the 2nd time I've made this post.... It didn't appear that the first one showed up ??
Sorry if this is a duplicate... (1 Reply)
Is there an easy way using a command or other routine for testing whether an argument on the command line is numeric? Just want to validate... I ran a search and didn't find a similar question....
Thx (3 Replies)
I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with
sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits.
The bank account... (7 Replies)
Hi
I am very new to linux and scripting.
I need to replace numbers abc with number xyz inputting from a reference file.
I used the following command -
sed "s/$grd/$lab/" , where $grd and $lab comes from reference file.
The problem is the above line doesnt take care of space..... (1 Reply)
these are numeric ids..
222932017099186177
222932014385467392
222932017371820032
222932017409556480
I have text file having 300 millions of line as shown above. I want to find duplicates from this file. Please suggest the quicker way..
sort | uniq -d will... (3 Replies)
hi,
i have a string
" 00000069 ThreadMonitor W WSVR0606W: Thread "WebContainer : 43|null" (00000069) was previously rep
orted to be hung but has completed. It was active for approximately 47533430 milliseconds. There is/are 43 thread(s) in tot
al in the server that still may be hung."
... (4 Replies)
Hi All,
I need to found the below numeric value using unix(shell) commands in .txt file and its available in root directory.
for example: file name is siva.txt and content is
Siva_12345_werwerwe,11,22,33
Siva_12346_werwerwe,22,33,44
Siva_12347_werwerwe,55,44,66
for above string i... (2 Replies)
Hi All,
I am trying to replace a certain value from one place in a file . In the below file at position 35 I will have 8 I need to modify all 8 in that position to 7
I tried
awk '{gsub("8","7",$35)}1' infile > outfile ----> not working
sed -i 's/8/7'g' infile --- it is replacing all... (3 Replies)