10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a text file and i want to run 3 sed commands for the lines entered by the user using perl script. I am doing this manually till now.
need some help with this
The sed commands I have to use are :
sed -i "s/{+//" error.txt
sed -i "s/+}//" error.txt
sed -i "s/\//g" error.txt... (5 Replies)
Discussion started by: utkarshkhanna44
5 Replies
2. Shell Programming and Scripting
i have a file which has 100 servers,i want a script which can output me ip address and hostname for that server.
Thanks in advance!!
input file
abc.com
output file should be
abc.com 192.168.1..1 (1 Reply)
Discussion started by: Moon1234
1 Replies
3. UNIX for Advanced & Expert Users
Hello,
I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies
4. Shell Programming and Scripting
Let's say I have a file called test.out. In this file I want to do the following:
1. Search for DIP-10219 and with this:
2. Remove everything in front of cn=
3. Remove everything after *com
4. Remove duplicate lines
5. Replace ( with \(
6. Replace ) with \)
For 1-3 I have figured out this... (11 Replies)
Discussion started by: exm
11 Replies
5. Shell Programming and Scripting
Hello I am hoping you may help.
I am not sure how to go about this exactly, I know the tools but not sure how to make them work together.
I have two SED commands that I would like to run in a shell script. I would like to take
the manual input of a user (types in when prompted) to be used... (4 Replies)
Discussion started by: lostincashe
4 Replies
6. Shell Programming and Scripting
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
Discussion started by: amarn
20 Replies
7. Solaris
Hi SSHers,
I have embedded this below code in my shell script..
/usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5`
SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies
8. Shell Programming and Scripting
Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:
sed '1,7w file1; 8,$w file2' fileA
I get only one file named file1 plus all the characters following file1. If I try to use curly... (1 Reply)
Discussion started by: varelg
1 Replies
9. Shell Programming and Scripting
hello!
I have a few sed commands
sed '/^$/d' < $1 > tmp.t
sed '/^ \{3,\}/d' < tmp.t > tmp1.txt
.....
how can I write them in a single line?
sed '/^$/d' < $1 > | '/^ \{3,\}/d' < $1 > tmp1.txt
any idea?
thanks. (5 Replies)
Discussion started by: george_
5 Replies
10. AIX
Hello:
How can i set permantly diferent IP addresses for a single NIC? I am using AIX 5.2 ML5
Thanks in advance!! (1 Reply)
Discussion started by: GEIER
1 Replies