move to a particular position and line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting move to a particular position and line
# 1  
Old 11-03-2009
MySQL move to a particular position and line

Hi,

How can i move to particular line and to a particular position in a file using unix commands ?

eg: in the line 30 and position 10 i want to print my name in a file.

Cheers,
Mohan
# 2  
Old 11-03-2009
look in your previous posts here. you have been shown how to use awk. Now, read the docs and see if you can come up with the code yourself.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to cut line from certain position?

Hi Gurus, I want to cut my file from 27th charactor to the end of line. can anybody give some unix command to do this. Thanks in advance (3 Replies)
Discussion started by: ken6503
3 Replies

2. Shell Programming and Scripting

Trying to move a column into another position within a sed script

Currently the table looks like this student-id,last,first,hwk1,hwk2,hwk3,exam1,hwk4,hwk5,exam2 pts-avail,,,100,150,100,200,100,150,300 991-78-7872,Thompson,Ken,95,143,79,185,95,135,259 123-45-6789,Richie,Dennis,99,123,89,189,97,139,279 234-56-7891,Aho,Al,78,146,75,176,88,128,285... (3 Replies)
Discussion started by: ertang
3 Replies

3. Shell Programming and Scripting

URGENT!!!move character x of input string to some position

i have this prob I have some records in a file1 like this 1001 sajal singh tampa 1002 .... so on i have a pattern file which is like this 1,4 4,13 14,15 i have to read the first pair 1,4 and extract that from the first record so the pattern is 1001 now i have to scramble 1001... (1 Reply)
Discussion started by: spankincubus
1 Replies

4. Shell Programming and Scripting

position of character in a line

i want to find the position of a character in a line , the first position, last, 5th occurence position , i ve tried grep -n , and expr index but they dont fit the bill. Please let me know if there is any other alternative (2 Replies)
Discussion started by: phpsnook
2 Replies

5. Shell Programming and Scripting

Help to move leading negative sign to trailing position

Hi All, I am having a file which contains negative numbers, wht i am doing is re-formattting the file(moving few columns and add few hard codings between), while reformatting i would want the negative numbers to have the sign as trailing rather than leading. Existing -2400.00 34 0.00... (11 Replies)
Discussion started by: selvankj
11 Replies

6. Shell Programming and Scripting

awk script to move a line after the matched pattern line

I have the following text format in a file which lists the question first and then 5 choices after that the explanantion and finally the answer. 1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies

7. Shell Programming and Scripting

Position to last line when vi opens a file.

Any Idea without entering any keystroke I can go to end of line in vi when I opening the file. When I am opening Vi I want to goto last line. when I give vi + filename it does not work. Any clue why it does not work. Thanks. (3 Replies)
Discussion started by: ekb
3 Replies

8. Shell Programming and Scripting

Deleting Characters at specific position in a line if the line is certain length

I've got a file that would have lines similar to: 12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies

9. Shell Programming and Scripting

File Manipulation (Move Column Position)

Hi All, I have a comma separated value (.CSV) file like the one below. The file contains about 20000 lines. FileName EmpNo,Name,Age,Sex,Band,Spouse,Children,Salary, 1000,Arnold,24,M,B,N.A.,No,10000, 1001,Jenny,27,F,C,John,2,20000, ................................... What i need is to... (1 Reply)
Discussion started by: ultimate
1 Replies
Login or Register to Ask a Question