10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Good day guys,
I'm having trouble in creating a logic when it comes to replacing the values inside a file.
I tried using sed command but it just doesn't work the way I want it to be.
Here is what I'm trying to achieve.
If my input file contains the values below.
NAME++GUEST1 ++GUESS2++... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
I am having the file as below .I need to replace column 9-12 with some other values. In the below file I need to replace 1509 to 1508 and 1508 to 1507 .Can you please help me in how to do that
Thanks,
Arun
... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies
3. Shell Programming and Scripting
please consider the following file, there are repeated blocks of m values, and nested s values within. there are 2 columns (cols 3 and 4)associated with each m,s combination. All s1 rows must get a value of a(col 3 in output), all s2 values must get a value of b(col 3 in output). If s1 and s2 rows... (1 Reply)
Discussion started by: senhia83
1 Replies
4. Shell Programming and Scripting
Hello everyone,
i need to replace in the second column of my csv file, points by nothing and dash by comma like this:
Input:
1 2 1;12.111.312-2;1.2;2;1-3
2 1 1;11.212.331-1;3.3;1;2-2
Output:
1 2 1;12111312;2;1.2;2;1-3
2 1 1;11212331;1;3.3;1;2-2
SED or PERL commands preferably.
... (7 Replies)
Discussion started by: satir
7 Replies
5. 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
6. Shell Programming and Scripting
hi all ,
( perl)
i am trying to replace jst one column in a file for eg
month dayofweek dealar car-name
jan thurs mercedes c300
feb wed lexus is300
all this data is in a master file and i want to replace jan with 1
feb... (5 Replies)
Discussion started by: technoman
5 Replies
7. Shell Programming and Scripting
I want to replace string values from a file to a file
For eg : File1 has 30 lines of string with values, those specific values needs to be changed in file2 and remaining values in file2 should be as it is.
For example:
From file (File1)
cluster.name=secondaryCluster
To replace File... (9 Replies)
Discussion started by: sriram003
9 Replies
8. Shell Programming and Scripting
I need to check for 4ht parameter values, if they are not in (17,18) in other words if they r not equal to 17 or 18 then exit.
can u help pls (4 Replies)
Discussion started by: raopatwari
4 Replies
9. Shell Programming and Scripting
Currently I am using the tr command in 3 scenarios for a ksh script.
1) Replacing any spaces in the file with a ~
tr ' ' '~' <$orignalFile> $newFile
2) After certain processing is done at the end of the scirpt i convert the Tilde back to spaces
tr ' ' '~' <$newFile> $newFile2
3) Last... (4 Replies)
Discussion started by: hgjdv
4 Replies
10. Shell Programming and Scripting
Replace disable_functions in php.ini with value of your choice which may be different on different servers
================================================
-bash-2.05b# grep disable_functions /usr/local/lib/php.ini
disable_functions = 1 2 e weq t ret rye y etyhty rt et e
... (3 Replies)
Discussion started by: fed.linuxgossip
3 Replies