10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
2. Shell Programming and Scripting
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Discussion started by: briandanielz
4 Replies
3. Shell Programming and Scripting
Hi,
Normally, I would do
cat /etc/oratab | grep -v "^#" | grep -v "^*" > /tmp/oratab.00
while read line
do
echo $line
done < /tmp/oratab.00I want to know whether it is possible to use an array instead of re-directing it to file?
As a test, I did something like below:
#!/bin/ksh
... (6 Replies)
Discussion started by: newbie_01
6 Replies
4. Shell Programming and Scripting
I have figured out how to grep the file like this:
echo `grep $(date +'%Y-%m-%d') Cos-01.csv | cut -d',' -f1`
The above line does echo the correct information from the lines in which my search criteria is found.
Now I am trying to get that information (Yes, just one column of every line) into... (6 Replies)
Discussion started by: TwelveDays
6 Replies
5. Solaris
Hallo :-)
Ich habe da ein Problem beim Zugriff von Solaris mittels rdesktop auf eine TS Farm unter W2K8R2 mit NLB und Session Broker.
Ich bekomme folgende Fehlermeldung:
user@sunray2xxx /h/user/Desktop 150 > rdesktop terminalserver
WARNING: Remote desktop does not support colour... (1 Reply)
Discussion started by: chrischi1978
1 Replies
6. Shell Programming and Scripting
Hallo,
ich habe mir mit meinen dürftigen Programmierkenntnissen ein Script zusammengebastelt über das ich in einem bestimmten Odner mit AWK alle Dateien eines Verzeichnis durchsuche und bestimmte Bezeichungen aller Dateien ändern kann.
Es funktioniert auch soweit, nur hätte ich gerne auch die... (1 Reply)
Discussion started by: ruffi
1 Replies
7. Shell Programming and Scripting
Hello,
I'm new in Shell scripting but i should write a script, which inserts the license header out of a txt-File into the files in our Projekt. For the Java classes it runs without Problems but for XML files not. At xml-files i have to put the license Header after the xml-Header (?xml... (2 Replies)
Discussion started by: PhoenixONE
2 Replies
8. Shell Programming and Scripting
I am not sure if using cat -n is the most efficient way to split a file into multiple files, one file per line in the source file.
I thought using cat -n would make it easy to process the file because it produces an output that numbers each line that I could then grep for with the regex "^ *$i".... (3 Replies)
Discussion started by: kapu
3 Replies
9. Shell Programming and Scripting
Hi Everyone,
I have a file: a.txt
a,b,c,d,6,6,6
1,2,3,d,6,6,6
4,5,6,6,6,6,6
#!/usr/bin/perl
use warnings;
use strict;
my @array = ();
### Load file into array
for my $i (split '\n', `cat /tmp/a.txt`) {
push @array, ;
}
It works. But my a.txt have 1million lines, and... (2 Replies)
Discussion started by: jimmy_y
2 Replies
10. Shell Programming and Scripting
Hello,
A few days ago I created my amateur version of the cat function in bash. Here is what I've done:
#!/bin/bash
#This is mycat. Similar to cat.
#For detailed information use path/to/mycat.sh -h option
arguments=$#
if ] #in case of standard input
then
while ]
do
read input... (4 Replies)
Discussion started by: sanchopansa
4 Replies