Hi. I appreciate your idea. But I want to keep my scope to second column only.
I have a case in my data which looks like
and suppose I grep whether second column contains 99 or not. It does not contain but also this row will be published. Because 4th column contains 99, if you know what i mean.
Regards
ADI
No, it doesn't. The command:
will print any line where the 2nd field STARTS with 5778. If you only want it to match when the 2nd field IS 5778, try:
If you used the command:
it didn't match the 4th field in the line:
it match the 99 in red.
If you want "contains 99" instead of "is 99", try:
which would match any of the lines:
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Hello,
Can someone please help me on this.:confused:
I have a file which has more than 1 million lines (XML file).
What I need is:
Search for "abcd" in the input file > output the result into a output.txt (colloum1)
Search for "efghi" in the input file > output the result in to... (3 Replies)
Dear friends,
Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number.
Program
COUNT=1
for MYDIR in `ls /`
do
VOBS=${MYDIR}
echo "${COUNT}. ${MYDIR}"
... (4 Replies)
Hello,
I have an input file like the following:
11_3_4
2_1_35
3_15__
_16989
Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hello,
I have a comma seperate metadata as follows:
CITY ,COUNTY,STATE,COUNTRY
NEW_YORK,NYC ,NY ,USA
NEWARK ,ESSEX ,NJ ,USA
CHICAGO ,COOK ,IL ,USA
SEATTLE ,MINER ,WA ,USA
In my process, I get two key values ie
CITY NAME (can be one of the... (7 Replies)
I have a table with this structure:
cola colb colc
1 19 lemon
20 31 lemon
32 100 lemon
159 205 cherries
210 500 cherries
and need to parse it into this format:
cola colb colc
1 100 lemon
159 500 cherries
So I need the first row of cola and the last row of colb if colc has the... (3 Replies)