10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is part of a larger script where I need to pass only 1 line of a file to the script, based on a variable and not a direct reference.
As part of a for loop :
# for((line=0;line<50;line++)); do
# awk ‘NR==$line' PhraseList.txt; done
... (5 Replies)
Discussion started by: Seth
5 Replies
2. Shell Programming and Scripting
I need shell script for the following specfic need, I'll get following output after running my program.
I wanted every 50th row in the coloumn and take into array.
For example input
==============
03
03
03
03
05
05
05
05
07
07
07
07
I wanted to extract 3,5,7 and store it in... (12 Replies)
Discussion started by: JITHENDER
12 Replies
3. Shell Programming and Scripting
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies
4. Shell Programming and Scripting
Hi
I have the below set of lines , i need to duplicate these lines 1000 times, also eevrytime when it is incremented , it should increment the one in Blue color.
130400030000010000200001
130400030000010000200002
140050030000010000200005A
eg:
130400030000010000200001... (5 Replies)
Discussion started by: santhoshks
5 Replies
5. 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
6. Shell Programming and Scripting
Hi Guys ,
I am having one command file like this
FILE1
################################
awk '/output/ {a=$2} {for(i=1;i<=NF;i++) { gsub("i1", i) ; gsub("i2",++i) ; gsub("P1", p) }}1' output >> out9
awk '/output/ {a=$2} {for(i=1;i<=NF;i++) { gsub("i1", i) ;... (2 Replies)
Discussion started by: jaita
2 Replies
7. Shell Programming and Scripting
Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1:... (1 Reply)
Discussion started by: shashi143ibm
1 Replies
8. Shell Programming and Scripting
I am attempting to write a housecleaning script that does the following:
1) goes to a specific directory
2) deletes all contents of that directory but a specific directory within it.
So my users all keep and use the Shared directory in OSX. Within /Users/Shared there are also standard named... (1 Reply)
Discussion started by: nomados
1 Replies
9. Shell Programming and Scripting
I want to put a text string in file using any method on specific line
line number 30
text to be put %this is location /var/www/filename (3 Replies)
Discussion started by: aliahsan81
3 Replies
10. HP-UX
Hello,
Below is my input file's content ( in HP-UX platform ):
ABCD120672-B21 1
ABCD142257-002 1
ABCD142257-003 1
ABCD142257-006 1
From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could... (2 Replies)
Discussion started by: jansat
2 Replies