10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a large string containing about 17,500 characters and I would like to obtain the value for token. token only appears in the entire string once and is towards the end of the string at the 17,200 area but that could change. Using perl can someone assist me with obtaining the value which in... (10 Replies)
Discussion started by: azdps
10 Replies
2. Shell Programming and Scripting
How can I have an intelligent script that will copy from source to destination directory if the file doesnt exist there or the chksum is not match.
SOURCE directory:
for i in `ls`
> do
> echo $i
> md5sum $i
> echo ""
> done
asdasda
00039a616135792fb609d04cf27aed95 asdasda
... (5 Replies)
Discussion started by: kenshinhimura
5 Replies
3. Shell Programming and Scripting
friends
as I can cut the first three characters in a string example:
400_FACTURACION_CANJES_20151217.txt
Result
400 (2 Replies)
Discussion started by: tricampeon81
2 Replies
4. Ubuntu
Hello all,
I am looking for a way to copy the existing Ubuntu server 12.04 to a USB (with all the packages and such) and make it boot from the USB.
I have seen other threads about copying the CD image to the USB, which is not exactly I am looking for.
Before I start diving into anything I... (4 Replies)
Discussion started by: br1an
4 Replies
5. Shell Programming and Scripting
Hi,
I have a string like:
read_lib {$lib/a.lib $lib/b.lib $lib/c.lib ..... }
Now, I want to search existence of all these *.lib files in $lib directory.
Please suggest- how to do it.
Thanks
-rkg (2 Replies)
Discussion started by: rkg
2 Replies
6. Shell Programming and Scripting
Hi Everyone,
$tmp="20090620231013";
$tmp = substr($tmp,0,8)." ".substr($tmp,8,2).":".substr($tmp,10,2).":".substr($tmp,12,2);
So my output is:
20090620 23:10:13.
I only can think substr is easy, any perl can do this just one line very simple efficient one? :eek:
Thanks (3 Replies)
Discussion started by: jimmy_y
3 Replies
7. UNIX for Dummies Questions & Answers
Hi friends,
I have written a perl code and it works fine but I am not sure tommorow it works or not, please help me.
problem : When diff is 1 then success other than its failure but tomorrow its 20090401 and the enddate is 20090331. thats why I write the code this type but it does not work and... (1 Reply)
Discussion started by: tukuna82
1 Replies
8. UNIX for Dummies Questions & Answers
Let's assume that I have a file with contents delimited by pipe:
"The mouse|ran up|the|clock"
"May|had a|little|lamb"
How would I use 'substr' to get the 3rd field. For example, "the" from the first line, and "little" from the second line?
# Loop over a file and read $LINE {
... (2 Replies)
Discussion started by: ChicagoBlues
2 Replies
9. Shell Programming and Scripting
For example,
/tmp/folder1
includes /tmp/folder1/a /tmp/folder1/b
/tmp/folder2
includes /tmp/c
Is there a command without removing files in /tmp/folder2 first to copy the /tmp/folder1 to /tmp/folder2?
and the result should be
/tmp/folder2 will include only /tmp/folder2/a... (2 Replies)
Discussion started by: lalelle
2 Replies
10. Shell Programming and Scripting
Shell Scripting Gurus,
I am having a hard time :confused: trying to figure out what I am doing wrong in my script. Below is the script snippet. It gives an error when it tries to execute the expression.
a=`expr substr $stringZ 5 10`
#!/bin/bash
echo "Hello"
stringZ="abcABC123ABCabc"... (3 Replies)
Discussion started by: yajaykumar
3 Replies