10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a data file d0 that looks like this:
$cat d0
server1 running -n-cv- 8G 3.1% 1435d 15h
server2 running -n---- 8G 39% 660d 22h
server3 running -n--v- 8G 2.5% 1173d 6h
server4 running -n---- 8G 1.1% 1048d 20h... (2 Replies)
Discussion started by: jake0391S
2 Replies
2. Shell Programming and Scripting
Hi,
I have a file that has data something like below:
A
B
C
D
.....
......
.....and so on
I am trying to bring it in one line with comma delimited something like below :
A,B,C,D
I tried the something below in the code section:
cat File.txt | tr '\n' ',' (1 Reply)
Discussion started by: rkumar28
1 Replies
3. UNIX for Dummies Questions & Answers
I need help removing the last character of every line if it is a certain character. For example I need to get rid of a % character if it is in the last position.
Input:
aaa%
%bbb
ccc
d%dd%
Output should be:
aaa
%bbb
ccc
d%dd
I tried this but it gets rid of all of the % characters.... (5 Replies)
Discussion started by: raptor25
5 Replies
4. UNIX for Dummies Questions & Answers
I need to remove square brackets from output of script.
Output is:
and I need to remove the square brackets so I am lett with
121 Is sed the only means to do this and if so what are the options?
...ok so far I have managed to get rid of ] by using /usr/bin/sed 's/]//' but that... (5 Replies)
Discussion started by: rob171171
5 Replies
5. Shell Programming and Scripting
I have a file like this:
DDD_ABCDE2AB2_1104081408.104480
I need to remove the 1 after the . in the file name so that it reads:
DDD_ABCDE2AB2_1104081408.04480
Having some difficulty getting the command to work. I tried using
cut -d 26
but that just doesn't work. (3 Replies)
Discussion started by: bbbngowc
3 Replies
6. Shell Programming and Scripting
Hi folks.
I have this variable called FirstIN that contains something like this: 001,002,003,004...
I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces)
I thought about using sed but i am not... (17 Replies)
Discussion started by: Stephan
17 Replies
7. Shell Programming and Scripting
Hi ,
I have a file with the following contents in file test1.txt .
AMY_MTT_240Y001,N60_PG2_10G001,A2H_P3H_10G002,7C7_7D7_NP1,A2E_PV0_10G002,L78_PG1_64S001,A2H_P2M_NP2,LDN_YSN_64S001,WV6_WYV_64... (5 Replies)
Discussion started by: kinny
5 Replies
8. Shell Programming and Scripting
Hi,
I'm using MKS tool kit to execute KSH on windows and samba to move files to unix from windows.
My script is appending header record for the data file.
I'm using
echo "$header" > $SambaFilename
cat $windowsfile >> $SambaFilename
But after execution of script ,The file in Unix... (2 Replies)
Discussion started by: ammu
2 Replies
9. UNIX for Dummies Questions & Answers
im having trouble doing this:
i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba
is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's?
im guessing its like getting the 1's compliment of the string
im doing this in... (2 Replies)
Discussion started by: vipervenom25
2 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am attempting to remove all the ^M characters in a file in VI.
The command I am using is
:1,$s/^V^M//g
but it doesn't work, saying 'substitute pattern match failed'.
Any ideas why?
Jules (2 Replies)
Discussion started by: julesinbath
2 Replies