10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to remove '--X' from the whole file and using variables replace $oldvar with $newvar.
I have tried with double quotes but it doesn't seem to work. $newvar is set to /usr/bin/bash. Would appreciate some guidance.
newvar=$(which bash)
oldvar=/bin/bash
sed... (1 Reply)
Discussion started by: itman73
1 Replies
2. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
3. Shell Programming and Scripting
Hello All,
I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B.
Note that my data has some other columns(not shown here) too (around 100) after col2.
Tool,Data
A,1
A,3
A,5
....
so on
B,2
B,4
.... ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
4. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
5. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I have been asked to create a bash script to delete comments from another file but in the file they have an echo command with this inside of it /* this is an echo */\ so obviously they want to keep this one in the file. I have found... (5 Replies)
Discussion started by: syco__
5 Replies
6. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am using LATEX and need to delete all the lines in a file matching:
\begin{work}
I know there are several ways to do this, but I am trying to do it with the substitute command in VI. The problem is I can't get substitute to recognize the character '\'!
How do I do it?
... (7 Replies)
Discussion started by: ScKaSx
7 Replies
8. Shell Programming and Scripting
hi
i have one file where i want to substitute only first instance of
swap
with swap1
i want to replcae only first instance of swap in my script
i know we can do this with awk. but i need to do this with sed only
i tried follwoing code
sed 's/swap/swap1' filename
but here all... (15 Replies)
Discussion started by: d_swapneel14
15 Replies
9. Shell Programming and Scripting
I have a file with a single line in it as below.
field1 field2 field3
Different fields separated by spaces. I need the output as below.
field1
field2
field3
Any sed/awk solution you can suggest? (6 Replies)
Discussion started by: krishmaths
6 Replies
10. UNIX for Advanced & Expert Users
Hello Unix Gurus,
We are doing large system upgrade. We expect upgrade to last 180-200 hours. The servers are located remotely.
I am looking for solution which allows me to reconnect to the same session active on unix server where I launched the process. This would protect from local client... (0 Replies)
Discussion started by: mehtasa
0 Replies