10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a csv dataset like this :
C,rs18768
G,rs13785
GA,rs1065
G,rs1801279
T,rs9274407
A,rs730012
I'm thinking of use like awk, sed to covert the dataset to this format: (if it's two character, then keep the same)
CC,rs18768
GG,rs13785
GA,rs1065
GG,rs1801279
TT,rs9274407... (7 Replies)
Discussion started by: nengcheng
7 Replies
2. Shell Programming and Scripting
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?
I am asking this because the file I have doesn't always follow a pattern.
For example the file I have is the result of a command to obtain windows ACLs:
icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
3. Shell Programming and Scripting
Hey,
I've created following script:
var1=test1
setA=testA
if
...
touch $setA/$var1
...
fi
I would like now the repeat the command touch (in this example) for different variables.
So below, the varX should run 3 times (var1, var2, var4). Var3 is skipped in this example... (4 Replies)
Discussion started by: brononius
4 Replies
4. Shell Programming and Scripting
How to repeat the execution of a simple command like the following for 1 sec ?
echo Hi
The completion time for the command is not known, but we need to calculate the number of times this commans executes successfully within 1 sec.
Thanks
Kumarjit (5 Replies)
Discussion started by: kumarjt
5 Replies
5. Shell Programming and Scripting
How do i write a loop ping to see if it get timeout or hang ? it should loop every 30 second to ping a server ?
ping -c 5 -t 15 www.google.com
if ]; then
date '+%Y-%m-%d %H:%M:%S Connection Unavailable' >> /home/sabercats/checkconnection.log
else
date '+%Y-%m-%d %H:%M:%S Connection... (3 Replies)
Discussion started by: sabercats
3 Replies
6. Shell Programming and Scripting
I have a file like this
2011-10-10 10:46:00,1-1-13-1-1,151510,ALCLA0A84D2C
2011-10-10 10:46:00,1-1-13-1-1,151520,65537
2011-10-10 10:46:00,1-1-13-1-1,151515,46932
2011-10-10 10:46:00,1-1-13-1-1,151521,32769
2011-10-10 10:46:00,1-1-13-1-1,151522,32769
2011-10-10... (4 Replies)
Discussion started by: LavanyaP
4 Replies
7. UNIX for Dummies Questions & Answers
I'm not sure if the problem I'm seeing is an artifact of sed or simply a beginner's mistake. Here's the problem: I want to add a zero-width space following each underscore between XML tags. For example, if I had the following xml:
<MY_BIG_TAG>This_is_a_test</MY_BIG_TAG>
It should look like... (8 Replies)
Discussion started by: rhetoric101
8 Replies
8. Shell Programming and Scripting
I am trying to use printf with a character string that is used within a do loop. The problem is that while in the loop, the printf prints the variable name instead of the value. The do loop calls the variable name from a text file (called device.txt):
while read device
do
cat $device.clean... (2 Replies)
Discussion started by: dleblanc67
2 Replies
9. Shell Programming and Scripting
Hi All,
I have done some looking at other threads but haven't found quite what I am looking for. I am a newbie to scripting and haven't got to where I want to you but here is my basic question. I have a script to copy a file and send it to another file with a date and time stamp. What I want to... (4 Replies)
Discussion started by: falcondown01
4 Replies
10. UNIX for Dummies Questions & Answers
On my system I use Escape "k" to go back in commands. I read on tutorials that it is ctrl p, but that does not work on my system.
Anyone know what the command to go foward is? (6 Replies)
Discussion started by: dereckbc
6 Replies