10 More Discussions You Might Find Interesting
1. Programming
I have a file which records banking transactions say like below.
user1 has deposited 10,000$ in his account
user2 has deposited 11,000$ in his account
user1 has withdraw today 5000$ from his account.
Lets say i read this file and convert each line as a list.
username= word
action=... (1 Reply)
Discussion started by: sahil_shine
1 Replies
2. UNIX for Beginners Questions & Answers
Goodmorning,
I know how to cut a string and a column, and how to find a word.
I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title.
I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
Discussion started by: echo manolis
14 Replies
3. UNIX for Dummies Questions & Answers
Hi I have a text file that I want to change some of the characters based on their position. My file contain multiple lines and characters should be counted continuously line by line. For example, I want to convert the 150th T to C. What can I do? Here is a portion of my file:... (10 Replies)
Discussion started by: a_bahreini
10 Replies
4. Shell Programming and Scripting
Hi All,
input file:
echo "a|b|c|d|test|123|same" | awk 'BEGIN {FS=OFS="|"} {print $1,$2,$7,$4,$5,$6}'
Got Output :
a|b|same|d|test|123
This is the sample input file with less fields. But my original file contains more field values. How to replace last value to 3rd postion value. Because... (8 Replies)
Discussion started by: Jairaj
8 Replies
5. Shell Programming and Scripting
Hi all
let's say i have a file named 1234_v2_abcd
i need to find the position of the character located after _v, in above case this would be character number 2
the count of the characters before _v can change, but i always have a number after _v
can anybody help :) (4 Replies)
Discussion started by: gigagigosu
4 Replies
6. Shell Programming and Scripting
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Discussion started by: elamurugu
5 Replies
7. Shell Programming and Scripting
Hi everyone,
Please some help over here. (I´m using cygwing)
I have files with 40 columns and 2000 lines in average. I´m trying to change the order position as follow.
Original columns position:... (3 Replies)
Discussion started by: cgkmal
3 Replies
8. Shell Programming and Scripting
I need help in removing a leading zero in a particular position.
For eg.: XYZ*04567472*0099*020091231*0123*0.12
In the above line, I want to replace "*0123" with "123" and "0.12" with ".12". I want to remove the leading zero only in position number 4 and 5 (the bolded segments)
I was able... (10 Replies)
Discussion started by: ananthmm
10 Replies
9. Shell Programming and Scripting
Hi All,
I wish to cut an input by using the below command but i would want to have the cut position as a variable.
For eg, the position number is 11 now and i wish that this number is being assigned to a variable before putting into the cut function.
Can this be done ?
Can any expert help?... (1 Reply)
Discussion started by: Raynon
1 Replies
10. Shell Programming and Scripting
Hi,
I have following format in file aaa with content below, and would like to seek help from forumer about how to change and swap the position on 2nd field.
5874957|901125|
95874960|650614|
95874966|870308|
901125 to be changed as 25-11-1990 for eg
Can someone help please ?? :)
... (6 Replies)
Discussion started by: cedrichiu
6 Replies