Changing ip in a custom way


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Changing ip in a custom way
# 8  
Old 08-10-2009
Hi,

I did what you explained me and it works, that is to say: I see in my command line the same change in IP address, but the change doens't seem te be written away in the original file.
It's like it does the change, but does not save it. Is there maybe an extra command I have to give to write it away in the orginal file (after it's been backed-up ofcourse Smilie)?
P.S. This really is exactly what I was seeking, so thanks a lot already for all the help!!!
# 9  
Old 08-10-2009
No offense but I was not aware that you are totally new to shell scripting. You can add a > symobol at the very end of the awk line so that it will be redirected into a filename like for example:

Code:
awk '... some code in here ...' file1 file2 > outfile

I guess it will be very good for you to read up a bit more of shell scripting in general since you will need it to put the puzzle together anyway.

Have a look at this, read it, play around with it:
Linux Shell Scripting Tutorial - A Beginner's handbook
# 10  
Old 08-11-2009
Well, I recently changed work, and on my now job, we just began working with Linux servers. So I am a newbie when it comes to shell scripting.
I'm getting the hang of Linux and it's commands, but the scripting, that's another thing. But in september I'm taking a professional course of Linux.
Really looking forward to it, so I can finaly say bye-bye to windows 4-ever.
And to be honest, the link of the shell scripting you gave, I allready have it in my Favorites, just did not have time to begin reading...
Tommorow I'm gonna try this last thing you said, but basicly, I think we are where I wanted to be.
I will let you know how it went!

---------- Post updated 08-11-09 at 02:48 AM ---------- Previous update was 08-10-09 at 11:37 AM ----------

Yep, works perfect..
Put a line after that to move the file to where it's supposed te be, and everithing is ok.
Again, thank you so much for the help, this forum is the best!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Custom Report

Hi All, Am getting the raw report from the source and need to prepare the custom report as per the requirement. Requirement keep getting change according to the need. Raw data is as below /* ----------------- test_job_hu ----------------- */ insert_job: test_job_hu job_type: CMD... (4 Replies)
Discussion started by: pradeep84in
4 Replies

2. Shell Programming and Scripting

Custom Shell

I have a jump off server, which grants SSH access to a few other servers. I would like to create a custom shell which can be assigned to specific user accounts which runs a menu script upon login, where they can select which server they want to jump too, however should they hit ctrl-c or any... (1 Reply)
Discussion started by: JayC89
1 Replies

3. Shell Programming and Scripting

custom command

hi I am trying to make my own commands in my linux.I thought a command for changing directories will be easy. I made a simple file amd made the entries #!/bin/bash cd /opt/mydir I then made the file executable and then moved it to /usr/bin. But when i type the script name nothing... (2 Replies)
Discussion started by: born
2 Replies

4. Shell Programming and Scripting

doing own custom parameters

I have an rsync command that I want to create a variable where user can change to customize the parameters. complete rsync command to run: $RSYNC -e 'ssh -ax -o ClearAllForwardings=yes' --log-file=$LOG_FILE --delete -avzcr -u --update $SRC_DIR $USER@$TRG_SRV:$TRG_DIR >> $LOG_FILE What I... (4 Replies)
Discussion started by: abubin
4 Replies

5. AIX

Custom AIX Prompt

In my .profile, my prompt is set like this: set -o vi PS1=`logname`@`hostname -s`:'$PWD>' Is there a way to show what the history number would be of the command I'm typing in the prompt? For example, I frequently run commands then run 'history' to pull up the history number of a command... (2 Replies)
Discussion started by: ptrotter
2 Replies

6. Shell Programming and Scripting

Custom auto-complete

Hello: I am using csh, and am a complete noob when it comes to shell scripting. I want the following: 1) Ignore case when doing auto-complete. 2) If there are multiple matches (example: I have files abc.txt abc.txt.1, abc.txt.2 and type abc<tab>), count the number of matches. If... (1 Reply)
Discussion started by: madiyaan
1 Replies

7. Shell Programming and Scripting

Custom PS command

(0 Replies)
Discussion started by: goldfish
0 Replies

8. Shell Programming and Scripting

Changing userID and Changing group and GID

Hello, I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job. linux1 linux2 linux3 linux4 linux5 ...... . . . . . 1.) How can i enter "password" in script rather asking me? I was trying this... ssh... (2 Replies)
Discussion started by: deal732
2 Replies

9. UNIX for Dummies Questions & Answers

How to custom application name in `ps -ef`?

A program named /usr/bin/aa.sh, two parameters: 11, 22. after start it, the row in `ps -ef` is almost like the following: root 12198 10278 0.0 Nov 25 pts/3 0:00.23 /usr/bin/aa.sh 11 22 but I want to change "/usr/bin/aa.sh 11 22" to one rule string, such as: "AA_11_22", how to... (1 Reply)
Discussion started by: linkjack
1 Replies

10. UNIX for Dummies Questions & Answers

Custom ftp settings

On the standard ftp supplied with Solaris and HP-UX is there anyone that has been able to disable users from certain settings. i.e the put function. Our customer ftp's onto the unix host and gets files for extraction into a pc based spreadsheet. I want to stop them from being able to delete... (1 Reply)
Discussion started by: blp001
1 Replies
Login or Register to Ask a Question