9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Good day to all,
I'd like to ask for your advice with regards to this.
Scenario :
I have here a file named TEST.tmp wherein the value inside is below;
"ONE|TWO|FIVE|THREE|FOUR|SIX~SEVEN~EIGHT" "NINE"
But when I'm trying to use this in a simple command like;
for TESTING in $(cat... (4 Replies)
Discussion started by: asdfghjkl
4 Replies
2. Shell Programming and Scripting
Hi Team,
Not getting the file output inside my email which i am sending from unix box. . Please refer the below code :
#!/bin/sh
{
sleep 5
echo ehlo 10.56.185.13
sleep 3
echo mail from: oraairtel@CNDBMUREAPZP02.localdomain
sleep 3
echo rcpt to: saurabhtripathi@anniksystems.com... (1 Reply)
Discussion started by: tripathi1990
1 Replies
3. Shell Programming and Scripting
Hi all,
I need to create loop script to read full line and append a variable to each line.
cat file
I need the output like below
10.0.0.1,136 1 24 048800 id N4 No_Light
10.0.0.1,137 1 25 048900 id N4 No_Light
10.0.0.1,140 1 28 048c00 id N4 No_Light
10.0.0.1,262 1 38 048e80... (13 Replies)
Discussion started by: ranjancom2000
13 Replies
4. Shell Programming and Scripting
Hello...
I am trying to loop through my hosts file that contains 100+ servers to check or update the nameservers on them...
My while loop is breaking after the first server responds...
#!/bin/bash
while read line; do
a=( $(echo $line | tr " " "\n") )
if }" != "" ] && }" != "#" ] &&... (1 Reply)
Discussion started by: CompSCI
1 Replies
5. Shell Programming and Scripting
ok..
so problem is:
I have a file that reads:
cat 123
1 and 2
3 and 4
5 and 6
I was using for loops to run through this information.
Code:
for i in `cat 123`
do
echo $i
done
shouldn't the output come as
1 and 2 (3 Replies)
Discussion started by: foal_11
3 Replies
6. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
7. Shell Programming and Scripting
cat myname.txt
John Doe I
John Doe II
John Doe III
-----------------------------------------------------------------------
for i in `cat myname.txt`
do
echo This is my name: $i >> thi.is.my.name.txt
done
-----------------------------------------------------------------------
cat... (1 Reply)
Discussion started by: danimad
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
9. UNIX for Dummies Questions & Answers
If I have a data file containing entries like-> abc abc:123
and I use a for loop:
for I in `cat data-file`
do
echo $I
done
the output would contain 2 lines -> abc.... and abc:123
but I want it to be on only one line. How can I do this?
thanks (1 Reply)
Discussion started by: sleepster
1 Replies