10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, the value in the following file is just an example. It could be a different value/network addresses.
Here is my example of initial output in a file name net.txt
Initial Output, net.txt
The goal is to produce the following format which is to convert from CIDR to Netmask... (6 Replies)
Discussion started by: type8code0
2. Shell Programming and Scripting
I would like to read a variable name from file and I would like to use this...
for STRING in `cat File.txt`
I would like the print XXXXXX.
Thanks :) (7 Replies)
Discussion started by: pinguc
3. Shell Programming and Scripting
Can someone tell me how I can do this?
a=$(echo -e wert trewt ertert ertert ertert erttert
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
4. Shell Programming and Scripting
I want to read below output, lets called it output1.txt and each string for every line will be declare as a variables.
This is the input file
196 server_a server_unix_2 FW
196 server_b server_win_1 CD
196 server_c server_win_2 CD
196 server_bd ... (2 Replies)
Discussion started by: sQew
5. Shell Programming and Scripting
I'm using bash and brand new to shell script. I would like to do the following.
I have a string which is "UPDATE=1.0". I would like to read the value "1.0" alone in a variable. i.e the things afer "=" How do I do that?
Thanks, (1 Reply)
Discussion started by: scriptfriend
6. Shell Programming and Scripting
i have one file which has list of data like this
i want to read each of in for loop from the script
can you give me syntax
Use code tags, ty. (2 Replies)
Discussion started by: mail2sant
7. Shell Programming and Scripting
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
8. Shell Programming and Scripting
i call my shell like:
my_shell "my project name"
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
9. Shell Programming and Scripting
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
the contents of the file (group) is below:
...... (6 Replies)
Discussion started by: daikeyang
10. Shell Programming and Scripting
can I read input by a user character by cahracter. And assign each character from the string to a variable?
Any help would be greatly appreciated!
Thank you! (1 Reply)
Discussion started by: Tek-E