10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
this is the requirement
list.txt
table1
table2
table3
testfile.txt
name#place#data#select * from table1
name2#place2#data2#select * from table 10 innerjoin table3
name2#place2#data2#select * from table 10
output
name place table1
name2 place table3
i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies
2. Shell Programming and Scripting
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
3. Shell Programming and Scripting
Hello,
I have a large data file which contains a huge amount of garbage i.e. words which do not exist in the language. An example will make this clear:
kpaware
nlupset
rrrbring
In other words these words are invalid in English and constitute garbage in the data.
I have identified such... (2 Replies)
Discussion started by: gimley
2 Replies
4. Shell Programming and Scripting
Hi,
I need to replace first row to second row:
Input:
A
JACK WAS_${HH}_JACK ....
Output should be:
JACK WAS_A_JACK ....
I tried below code..
awk '{TEMP= (NR==1)}; {sub(/${HH}/$TEMP/)}' (2 Replies)
Discussion started by: kmsekhar
2 Replies
5. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
6. Shell Programming and Scripting
hi guys, today i'm stuck in a new problem.
the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example.
I have different html files and each of them have a consecutive lines group inside that i want to extract.
example:
... (8 Replies)
Discussion started by: sbobotex
8 Replies
7. Shell Programming and Scripting
Hi
I want to append line 2n to 2n-1 line where n=1...LastLine in my file.
eg:
Actual File:
Hello
Everyone
Welcome
TO Unix
I need
Your help
Required File:
HelloEveryone
WelcomeTO Unix
I needYour help (5 Replies)
Discussion started by: dashing201
5 Replies
8. UNIX for Dummies Questions & Answers
Hi all, I made a C++ program in dos (in dev-C++) and uploaded it on Solaris box. On opening that file with 'vim' editor i found that there is some extra new lines after each written code line. I tried to find out is the file is in dos or in unix format, with 'file' command,and i got "<file-name>.h:... (4 Replies)
Discussion started by: KornFire
4 Replies
9. Shell Programming and Scripting
Hi All,
I have file
i have values like
----
112
113
109
112
109
I have another file
cat supplierDetails.txt
-------------------------
112|MIMUS|krishnaveni@google.com
113|MIMIRE|krishnaveni@google.com
114|MIMCHN|krishnaveni@google.com
115|CEL|krishnaveni@google.com... (10 Replies)
Discussion started by: kittusri9
10 Replies
10. Shell Programming and Scripting
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies