10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Could anyone please help me with Assigning a value to variable and then updating the value in the original file
IFS='|'
while read -r Serial_ID JOB_NAME STATUS
do
if
then
echo "Perform Fuctions"
???Assign STATUS to COMPLETED and Update File???
done <File (7 Replies)
Discussion started by: infernalhell
7 Replies
2. Shell Programming and Scripting
Hi,
I have a variable which stores file names as a result of find command. I need to delete all these files one by one, i.e. by a loop. Can anyone tell me how can it be done?
The variable f2d has the file names like these
abc.txt
bcd.txt
fff.txt
gef.txt
Now I have used a loop as... (12 Replies)
Discussion started by: jhilmil
12 Replies
3. Shell Programming and Scripting
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies
4. Shell Programming and Scripting
Hi, I was wondering if anyone could assist me for (what is probably) a very straightforward answer.
I have input files containing something like
File 1
Apples
Apples
Apples
Apples
File 2
Bananas
Bananas
Bananas
Bananas (4 Replies)
Discussion started by: hubleo
4 Replies
5. Shell Programming and Scripting
Hello Guys,
I have a small loop problem as below.
I have 3 different values to be used while running the same script -
va1="some-value1"
va2="some-value2"
va3="some-value3"
Now I want to use these three variable values to be used for running the same command, like -
while... (1 Reply)
Discussion started by: rockf1bull
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS>
I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it.
Using the following code prints the values... (12 Replies)
Discussion started by: manishab00
12 Replies
7. Shell Programming and Scripting
The situation is like this:
I am reading records from a file, depending upon some condition extracting fields from the file into different variables in a loop one by one. I need to print all the variable in line, so I am trying to redirect hose variables one by one to a variable called final_value... (1 Reply)
Discussion started by: mady135
1 Replies
8. Shell Programming and Scripting
Guys I am trying to assignthe values to variables from a for loop.
s1:/tmp> for i in `cat test`
> do
> echo $i
> done
Sdosanjh
2
6
Now, I want is
NAME=Sdosanjh
CURRENT=2
SPECIFIED=6
there are multiple lines in the "test" file.
So next time when for loop picks values from next... (1 Reply)
Discussion started by: sdosanjh
1 Replies
9. Shell Programming and Scripting
I have a set of variables:
f1="./someFolder"
.
.
f10="./someOtherFolder"
And I'm trying to use the following loop
for (( i = 0; i <= 10; i++ ))
do
temp=f$i
done
I'm trying the get the values from my set of variable to make directories, but I can't seem the get those value... (3 Replies)
Discussion started by: kriuz
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have file abc.txt which has keys and emails addresses
abc.txt
emailkey1:sam@abc.com
emailkey1:tom@abc.com
emailkey2:rqw@abc.com
emailkey2:tut@abc.com
I have a shell script where i pass key as the parameter and i want all the email addresses within that key concatenated by a comma... (21 Replies)
Discussion started by: samit_9999
21 Replies