10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello guys,
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
5 Replies
2. Shell Programming and Scripting
Hi all,
I have a file sample.txt
abc
asd
adf
daf
adw
add
adv
wdf
I want to control the number of lines to read
Like if i give input as ./script_name 2 5
required output
asd
adf
daf (2 Replies)
Discussion started by: krux_rap
2 Replies
3. Shell Programming and Scripting
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies
4. UNIX for Dummies Questions & Answers
Hello Everyone.
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
else
... (5 Replies)
Discussion started by: grc
5 Replies
5. Shell Programming and Scripting
Hi
I don't know, how read only number and when is on enter letter so I want write "Wrong enter "
Thank you and Sorry for my English (4 Replies)
Discussion started by: hroch
4 Replies
6. Shell Programming and Scripting
Hiii
I am very new to shell scripting.This is my data file
a.txt:
56
45.78
1000
11.23
76.89
45
34.56
23
3400
100
..........
Now i am must use shell scripting to read n number of lines from the file & from ts n number of lines i need to find greatest number among them & so on for... (44 Replies)
Discussion started by: varsha
44 Replies
7. Shell Programming and Scripting
Hi Guys,
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.
ex.
1 a
2 b
3 c
4 d
And to my command i pass as 2.
so i should get output as 2 b
... (15 Replies)
Discussion started by: kam786sim
15 Replies
8. Shell Programming and Scripting
I have a file TXTPROCESS.TXT.20071129 in which line 1 contains the file name and rest of the records are data.
The file data looks like this:
TXTPROCESS.TXT.20071129
DIVD20071129
INTR20071129
BALN20071129
From line 2 onwards the first 4 characters defines individual process. What I... (2 Replies)
Discussion started by: skymirror
2 Replies
9. Shell Programming and Scripting
I am writing script in c shell and using this script to read the command line arguments, but it is not working. Pl. someone let me know what is the problem.
#!/bin/csh -f
if ($#argv <> 2) then
echo "you must give exactly two parameters"
else
set name1 = $argv
... (1 Reply)
Discussion started by: skumar11
1 Replies
10. Shell Programming and Scripting
Hello,
I think its a sinple query but somehow i m stucked up here...
I am trying to enter n number of inputs from the user and write them in
an input file ie row wise...
I tried standard commands like
$echo "enter the inputs for the file"
$read var1 var2 var3 var4
test1 test2... (14 Replies)
Discussion started by: er_aparna
14 Replies