10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have list of files present in a folder. I want to search for a particular keyword sequentially and create a file which will be later used by some other program.
Input files:
$ ls
a.dsx b.dsx c.dsx Dataline_.txt Dataline.txt loop.sh
$ cat *.dsx
help
tyiis
global
for i in... (4 Replies)
Discussion started by: mac4rfree
4 Replies
2. Shell Programming and Scripting
Hi All,
When i use sort Test, here is the output:
$ sort Test
a
b
b
c
d
e
f
g
h
i
But the contents in the file remain unsorted, how to do that?
]$ cat Test
g
i (6 Replies)
Discussion started by: chandrakanth
6 Replies
3. Shell Programming and Scripting
Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt:
I have the following file (users.txt):
AU0909,on
AU0309,off
AU0209,on
AU0109,off
And this file (userson.txt)
AU0909
AU0209
AU0109
AU0309
I just want to set those users on userson.txt to "off" in... (14 Replies)
Discussion started by: quinestor
14 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
Hi,
Im struggling with what chmod to change the permission of a file in the current directory named MyFile so the command "cat MyFile" fails to display the file.?? (10 Replies)
Discussion started by: tryintolearn
10 Replies
6. Shell Programming and Scripting
Hi,
How to add string inside the file. In this case adding 63 in the beginning of each line. Thnks.
e.g. what is inside the file
Mobile Number Portability
9051151234
9051261345
9051393245
9051412345
9051507654
should like this as output:
Mobile Number Portability (7 Replies)
Discussion started by: shtobias
7 Replies
7. Shell Programming and Scripting
i=1
while
do
touch TC$i.txt
i=`expr $1 + 1`
done
echo "files created successfully"
What is wrong with code...its running continuosly... (4 Replies)
Discussion started by: villain41
4 Replies
8. UNIX for Dummies Questions & Answers
I am not able to read inside a while though i get the message "inside read" the cursor doesnt prompt from the console
cat file | while read ln_new_engine_dirs
do
echo "inside $ln_new_engine_dirs"
if
then
read nn
echo "inside read"
fi
done
Thanks in advance (3 Replies)
Discussion started by: ssuresh1999
3 Replies
9. UNIX for Dummies Questions & Answers
I have a question to do and it's somewhat confusing. It says, and I quote
"Create a file called file_1 with three lines of text in it. Create a shell variable called "f_name", assign it the string "file_1". Use the cat command and the variable "f_name" to display the contents of the file... (3 Replies)
Discussion started by: MaestroRage
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a .txt file
Sample:
=====================
NEXT HOST
=====================
AEADBAS001
ip access-list extended BLA_Incoming_Filter
ip access-list extended BLA_Outgoing_Filter
access-list 1 permit xxxxxxxxxxxxxx
access-list 2 permit xxxxxxxxxxxxxx
=====================... (4 Replies)
Discussion started by: I-1
4 Replies