10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am trying to do this with one small tweak. I would also like to use a space as a delimiter.
sed 's/ */\
/g' file
This is what my file looks like.
server1, server2, server3
server4 server5 server6
I would like it to look like this.
server1
server2
server3
server4 ... (6 Replies)
Discussion started by: cokedude
6 Replies
2. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
3. Shell Programming and Scripting
Hi there.
I'm facing a strange & an intriguing behaviour with sed while replacing the tab character with a space reading from a file. It randomly works sometimes but mostly doesn't work.
Below is what's happening-
<tab> here is the actual literal tab.
user1> cat temp2
1<tab>2<tab>3 4... (2 Replies)
Discussion started by: Deepak.Dhami
2 Replies
4. Shell Programming and Scripting
This is a weird problem. Following is my code.
/opt/quest/bin/vastool configure pam sshd
/opt/quest/bin/vastool configure pam ssh
cat /etc/pam.conf | \
awk '$1=="ssh"||$1=="sshd"||$1=="emagent"{sub("prohibit","aix",$NF);}1' OFS='\t' > /etc/pam.conf
cat /etc/ssh/sshd_config | \
sed -e... (2 Replies)
Discussion started by: pjeedu2247
2 Replies
5. Shell Programming and Scripting
Experts,
At the moment I am working in AIX box where sed -i is not available.
My requirement is as below
Two files file1 and file2. file1 contains the IP address, its count. file2 contains the Hostname and its corresponding IP address. I would like get the IP address replaced with the apt... (7 Replies)
Discussion started by: sathyaonnuix
7 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I've wrote a script to truncate newline characters in a text file. Could you please help me in figuring out the issue
:confused:
for file in $Filelist; do
echo $file;
FileName=`basename $file`;
sed 's/^M//g' $file> "${file}"2;
mv "${file}"2 "${file}";
sed '1d' "${file}"... (5 Replies)
Discussion started by: udayakumar
5 Replies
7. Shell Programming and Scripting
Hello,
I have a problem running a script created in ksh for Linux (Tested on Debian 5.0, Ubuntu Server 10.04 and RHEL 5.1), it works properly. :b:
I trying to pass it to a AIX 5.3. :wall:
The problem is the character limit of 256 on a command system and SED.
I need to cut the contents of... (8 Replies)
Discussion started by: nemesis.spa
8 Replies
8. Shell Programming and Scripting
Hi,
I want to modifiy the hour in the crontab AIX 5.3 for this line:
Input:
00 22 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
Output:
30 20 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
With the awk or sed function through a ssh -q... (1 Reply)
Discussion started by: khalidou13
1 Replies
9. Shell Programming and Scripting
In a Korn shell script I have,
cat ../header | sed -e 's/flag1/$cnumb/g' > header.txt
The header is short
{{Company flag1}}
But the result in header.txt is
{{Company $cnumb}}
The value of $cnumb is 120. I am trying to get the value of $cnumb into the header.
I have tried /'$cnumb'/g,... (10 Replies)
Discussion started by: jcarrott
10 Replies
10. Shell Programming and Scripting
Hi All,
I have one doubt in the AIX. I executed the below command in the LINUX but i could not execute same thing in the AIX. Please see the details of my issue in below.
# cat test
line 1 (one)
line 2 (two)
build=test
line 3 (three)
# sed -r 's/build=\w+/build=new_build/' test
line 1... (7 Replies)
Discussion started by: sridhusha
7 Replies