10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Input are file and file1
file contains
store.bal
product.bal
category.bal
admin.bal
file1 contains
flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0
store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies
2. Shell Programming and Scripting
Hi Everyone,
Is there a way I can print specific lines using sed -n '3,3p' file.dat or awk 'FNR==3' file.dat when using variable?
For example, I have this script (get_line.ksh) that accepts line parameter that a user wanted to print in the file.dat.
file.dat
one
two
three
four
... (1 Reply)
Discussion started by: zzavilz
1 Replies
3. Shell Programming and Scripting
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.
Brief overview:
I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies
4. Shell Programming and Scripting
Say the input was as follows:
Brat 20 x 1000 32rf
Pour 15 p 1621 05pr
Dart 10 z 1111 22xx
My program prompts for an input, what I want is to use the input to locate a specific field. Like if I type in, "Pou" then it would return "Pour" and just "Pour"
I currently have this line but it is... (6 Replies)
Discussion started by: Bungkai
6 Replies
5. Shell Programming and Scripting
Dear UNIX community,
I would like to to count characters from a specific row and have them displayed line-by-line.
I have a file called testAwk2.csv which contain the following data:
rabbit penguin goat
giraffe emu ostrich I would like to count in the middle row individually... (4 Replies)
Discussion started by: vnayak
4 Replies
6. Shell Programming and Scripting
Hi,
I have file with lines key=val.
For ex(conf.file):-
c=3
ef=78
b=40
ca=40
I want to remove the line with c=3, when I execute the below command it's removing both lines i.e c=3 and ca=40. Could you please correct my command.
/usr/xpg4/bin/awk -v key=c 'match($0,key)... (3 Replies)
Discussion started by: axes
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I would like to get the specific line from the file taking specific coloumn as reference.
Thanks and Regards (1 Reply)
Discussion started by: kkarthik_kaja
1 Replies
8. Shell Programming and Scripting
Hi All,
Although its a basic question the last 2 hours of googling and trying didnt help me to achieve what i want. Maybe some one can help me
I have a text file
text1.txt:
blablablabla
A B C
D E F
and i would like to read to read what is on position E (line 3 column 2) in a... (2 Replies)
Discussion started by: Radamez
2 Replies
9. Shell Programming and Scripting
Hi,
I have a script that fetches only specific information from fcinfo command. Below is a portion of the script.
#!/usr/bin/ksh
set -x
HBA_COUNT=`sudo fcinfo hba-port | grep -i state | awk 'END{print NR}'`
echo "$HBA_COUNT HBAs exist"
echo '........'
INDEX=1
while $INDEX -le... (2 Replies)
Discussion started by: jake_won
2 Replies
10. Shell Programming and Scripting
Hi,
I have a file on unix which contains
--------------------------------------
1 # Do not remove the following line, or various programs
2 # that require network functionality will fail.
3 127.0.0.1 romhelp3 localhost.localdomain localhost
4
... (2 Replies)
Discussion started by: srikanthus2002
2 Replies