10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
2. Shell Programming and Scripting
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies
3. UNIX for Advanced & Expert Users
Hi all,
I'm new in unix. Need some help here.
I have a file called server.cfg which contains the servers name, if I don't want to run on that server, I'll put a "#" infront it.
username1@hostname.com
username2@hostname.com
#username3@hostname.com
#username4@hostname.com... (17 Replies)
Discussion started by: beezy
17 Replies
4. 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
5. Shell Programming and Scripting
Dear users,
I have a file like this:
geometry,geometry_vertex_count,Id,strnum,platecode,datatype,dtnum,refnum,appearance,disappeara,color,geogdesc,datatype_ft_style,import_notes
"<LineString><coordinates>-130.6539,51.5103,0
-130.7708,51.6287,0
-130.8356,51.6832,0
-130.9211,51.7772,0... (5 Replies)
Discussion started by: Gery
5 Replies
6. Shell Programming and Scripting
Hi All,
I have a .txt file with some contents as below:
Hi How are you?
# Fine and you?
I want a script file which reads the .txt file and output the lines which does not start with #.
Hi How are you?
Help is highly appreciated.
Please use code tags when posting data and... (5 Replies)
Discussion started by: bghosh
5 Replies
7. 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
8. Shell Programming and Scripting
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies
9. 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
10. 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