10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I am writing a bash script that will search a file line by line for unix timestamps, store all of the timestamps into an array, then check how many of those timestamps were created within the last hour, and finally increment a counter every time it finds a timestamp created within the last hour.... (6 Replies)
Discussion started by: jsikarin
6 Replies
2. Shell Programming and Scripting
I like to “optimize” / make more like a real program my bash script by replacing repetitious code which utilizes positional parameters.
I am having two issues I cannot solve and would appreciate some assistance with resolving them.
a) how to modify the whiptail checklist... (3 Replies)
Discussion started by: annacreek
3 Replies
3. Shell Programming and Scripting
Hello!
I'm making an English to Morse Code translator and I was able to mostly get it all working by looking through older posts here; however, I have one small problem.
When I run it it's just printing spaces for where the characters should be. It runs the right amount of times, and if I try... (3 Replies)
Discussion started by: arcoleman10
3 Replies
4. Shell Programming and Scripting
Hello:
I've input data:
Input data
--- 3:60069:C:T 60069 C T 1 0 0 1 0 0 1 0 0 1 0 0 1
--- 3:60079:A:G 60079 A G 1 0 0 0.988 0.012 0 1 0 0 1 0 0 1
--- rs186476240:60157:G:A 60157 G A 1 0 0 1 0 0 1 0 0 1 0 0 1
I edit/make first few columns before numbers (6th column) and want to... (4 Replies)
Discussion started by: genome
4 Replies
5. Shell Programming and Scripting
I have a file contains data with non-printing characters. i have used cat -v filename to display whole data with non-printing characters also.
However, i need lines with non-printing characters into seperate file. My file is huge and looks like i have to manully find lines using cat -v filename |... (3 Replies)
Discussion started by: JSKOBS
3 Replies
6. Shell Programming and Scripting
for VGLIST in `lsvg -o`
do
CLOSED_OUT=`echo $VGLIST | lsvg -l $VGLIST | awk '{print $6 " " $7}' | grep closed`
if ]; then
echo "Filesystems $CLOSED_OUT in VG that are in Closed status"
else
echo "\n Some message"
fi
Above Code is working fine, but echo "Filesystems $CLOSED_OUT... (8 Replies)
Discussion started by: chandu123
8 Replies
7. Shell Programming and Scripting
Hi, I'm using a while-loop in an awk script. If it matches a regular expression, it prints a line. Unfortunately, each line that is printed in this loop is followed by an extra character, "1".
While-statement extracted from my script:
getline temp;
while (temp ~ /.* x .*/) print temp... (3 Replies)
Discussion started by: redbluefish
3 Replies
8. Shell Programming and Scripting
ive input file contains to clums a and b spreated by pipe
a | b
123|456
323|455
and
xyz contains other info about a and b
now i want to print as follows:
a | b | "info from xyz"
but "info from xyz" might be more than 1 line and i want to keep the format to 3 cloums.
how to do it?... (3 Replies)
Discussion started by: windows
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
One silly question. I would like to add statement like below and append to a file. I used the below code; however, it does not work. Can anyone please tell me what mistakes I have made?
awk '
{ for (i=1;i<=563;i++)
print i
}'>>output.txt
Thanks.
-Jason (1 Reply)
Discussion started by: ahjiefreak
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have got a little problem where some of the files I created had some funny characters e.g space ,"^M" etc inserted in the full file name and which caused our backup script to skip those files.
Is it possible to find out if there are any funny charaters in a string ?
Thanks, (4 Replies)
Discussion started by: ahjaeasedqa
4 Replies