9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want to grab lines from a file that are between two patterns (including the lines that contain the pattern).
here's what im currently doing:
data.txt
aaa
bbb
cccc
ddd
eee
ffff
ddd
code:
awk '/bbb/,/fff/ && $0 !~ /ddd/' cdsnmp.sh
I want to grab lines between and including bbb... (5 Replies)
Discussion started by: SkySmart
5 Replies
2. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
3. Shell Programming and Scripting
Hi everyone,
This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file):
ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Discussion started by: jeremy589
1 Replies
4. Shell Programming and Scripting
Hi All,
I have 100's of files in the following format. I need to grep or parse out some values from each of the files
{
“tree”: “((A:0.2{0},B:0.09{1}):0.7{2},C:0.5{3}){4};”,
“placements”:
, ], “n”: },
{“p”: ], “n”: }
],
“metadata”:
{“invocation”:
“pplacer -c... (1 Reply)
Discussion started by: Lucky Ali
1 Replies
5. Shell Programming and Scripting
Hi All,
I am running a command from a remote server using ssh to different servers. I will get a output like below with 4 columns. I want to grab line which is having a coulmn which grate than or equal to 50. How can I do it with Awk or sed ??. I add a space to first row with sed 's/::/:: /g' to... (4 Replies)
Discussion started by: raghin
4 Replies
6. Shell Programming and Scripting
Hi,
Is there an easy way to simulate following Perl code in Bash.
if ( grep {$my_value eq $_} @ARGV ){
print "Do Something\n";
} else {
die "Invalid value";
} (0 Replies)
Discussion started by: paragkalra
0 Replies
7. Shell Programming and Scripting
I have read another post about this issue and am wondering how to adapt it
to my own, much simpler, issue.
I have a file of user IDs like so:
333333
321321
546465
...etc
I need to take each number and use it to print records wherein the 5th
field matches the user ID pulled from the... (2 Replies)
Discussion started by: Bubnoff
2 Replies
8. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
9. Shell Programming and Scripting
I am using awk command for greping an value from the file
the file contains ..
file
----------------------------
content-----------
--------
String main = "81507066666";
------------------------------
i am greping the above value using awk command
NumberToReplace=`cat "file" | grep... (1 Reply)
Discussion started by: vastare
1 Replies