9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
Using a bash script , I have a variable name for the file I want to modify
FILE_TO_EDIT="/etc/my_config_file"And I have a variable name for the parameter to change
PARAMETER="fallback_node"
PARAMETER_NEW_VALUE="http://my_server_name.com/new_path"
A config file may contain :
1°)... (2 Replies)
Discussion started by: jcdole
2 Replies
2. Shell Programming and Scripting
Hello everyone,
I'm struggling with this command:
awk '!/^\+/{ORS=FS}/^\+/{ORS=RS}1' file1 > file2
What I want to do is to move any line that starts with the + sign 1 up, so its the continuation of the previous.
The above command is messing the whole output, can you please let me know... (8 Replies)
Discussion started by: demmel
8 Replies
3. Shell Programming and Scripting
What's the command syntax for stripping out the tar.gz file extension in a bash command line (not script file). Thanks!
prompt/> ls *.tar.gz | <what comes here?> (3 Replies)
Discussion started by: ZillaG
3 Replies
4. HP-UX
Whenever I type the @ sign like for example when using a proxy ftp server, The system forces the cursor to jump to a new line. I know it has something to do with the terminal settings.
How can I get this to stop and more importantly, how can I modify my profile to set this up whenever I login?
... (3 Replies)
Discussion started by: ricnetman
3 Replies
5. Shell Programming and Scripting
Hello everyone,
I am trying to search a file for lines that start with 'ip:' and have a carriage return after(ip:$). I then want to remove the carriage return from that line and append the next line in the file to the line containing 'ip'. I tried doing this with SED, but had no luck. Any... (3 Replies)
Discussion started by: vada010
3 Replies
6. Shell Programming and Scripting
Hi
Is there any command to scan thru a file looking for 2 consecutive blank lines and if any remove one of them. Please let me know.
Regards,
Tipsy (6 Replies)
Discussion started by: tipsy
6 Replies
7. Shell Programming and Scripting
I have a variable dynamically generated
$batch = /dataload/R3P/interface/Bowne/reports/RDI00244.rpt
Now I'd like to strip '/dataload/R3P/interface/Bowne/reports/RDI' and '.rpt' from this variable
my output should be only 00244
how to do this using perl regex.I'm a newbie to perl and would... (1 Reply)
Discussion started by: ramky79
1 Replies
8. Shell Programming and Scripting
I have a file that looks like this:
/home/fred/opt/bin
/opt/usr/bin
/usr/sbin/var/opt
I need a way to chop of everything after the last occurance of the / sign including the /. So the file above will now look like this below.
/home/fred/opt
/opt/usr
/usr/sbin/var
I tried using... (6 Replies)
Discussion started by: x96riley3
6 Replies
9. Shell Programming and Scripting
I'd like to make a script that I can execute every time I sign on to my linux box that keeps track of the time and allows to me to add a remark to a file. So basically once I log in, I run the script, and it outputs the date and time to a text file (log.txt). But that isn't my problem.
I need... (1 Reply)
Discussion started by: Glider
1 Replies