10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to ksh scripts. I would like to be able to read a file line by line from a certain line number. I have a specific line number saved in a variable, say $lineNumber. How can I start reading the file from the line number saved in $lineNumber? Thanks! (4 Replies)
Discussion started by: dcowboys13
2. Shell Programming and Scripting
I'm struggled to get a number from a very long text file.
NAtoms= 33 NActive= 30 NUniq= 23 SFac= 1.00D+00 NAtFMM= 60 NAOKFM=F Big=F
Integral buffers will be 131072 words long.
Raffenetti 2 integral format.
The number 33 is what I wanted, always follows NAtoms=... (5 Replies)
Discussion started by: liuzhencc
3. Shell Programming and Scripting
I have a file sample.txt
I want to control the number of lines to read
Like if i give input as ./script_name 2 5
daf (2 Replies)
Discussion started by: krux_rap
4. UNIX for Dummies Questions & Answers
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Discussion started by: victor.s
5. UNIX for Dummies Questions & Answers
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
... (5 Replies)
Discussion started by: grc
6. UNIX for Dummies Questions & Answers
Hello, I'm trying to create a BASH file that can read all the files in my working directory and tell me how many words and lines are in that file. I wrote the following code:
for f in "$FILES"
echo -e `wc -l -w $f`
My issue is that my file is outputting in one... (4 Replies)
Discussion started by: jl487
7. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
8. Shell Programming and Scripting
I am new to unix.
Actually i want help in writing an single command where
i can actually read specific line number in file where the line number will be passed to command as parameter.
And to my command i pass as 2.
so i should get output as 2 b
... (15 Replies)
Discussion started by: kam786sim
9. Shell Programming and Scripting
I want to read one number from the file.
Only one number will be there in the file.
then i have to increment the number in my script and put it back in the same file.
Is it possible?
Can anybody help me?
Vinay (6 Replies)
Discussion started by: vinayakatj56
10. Shell Programming and Scripting
I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting.
Please help me out for this.
S.Kamakshi (2 Replies)
Discussion started by: kamakshi s