Search Results

Search: Posts Made By: vel4ever
6,801
Posted By RudiC
No, it does not. Your (unnecessary!) echo...
No, it does not. Your (unnecessary!) echo transforms the painfully achieved newlines to spaces. Why at all do you use echo?

That's true: it does not work. It can't! Remove the urls.txt new from...
6,801
Posted By alister
You did it incorrectly. split needs to read from...
You did it incorrectly. split needs to read from standard input (the pipe), so that it can see the result of tr's work, one url per line. Instead of the name of the file with the original data, you...
6,505
Posted By zaxxon
$ echo "Here is the test string 12233"| awk...
$ echo "Here is the test string 12233"| awk '{print $NF}'
12233
1,902
Posted By itkamaraj
$ cat f.sh #!/bin/bash echo "Shell Script" ...
$ cat f.sh
#!/bin/bash
echo "Shell Script"
exit 1

$ cat f.pl
#!/bin/perl
print "PERL Script";
exit 1;

$ cat g.sh
#!/bin/bash
bash f.sh
wait
perl f.pl
echo "Complete"

$ bash...
1,693
Posted By Scott
What are the permissions on the dir2/master.sh...
What are the permissions on the dir2/master.sh script? Is it executable?

By using . (dot) you are "sourcing" the script into your current environment, and it's run from there. If you want to run...
3,703
Posted By guruprasadpr
Hi That is how dbms_output.put_line works....
Hi

That is how dbms_output.put_line works. it keeps everything in the buffer, and at the end of the procedure, it is flushed out.

You can check with UTL_FILE package wherein you actually...
18,683
Posted By itkamaraj
i missed the / find /root/files -name...
i missed the /


find /root/files -name "*.gz" 2>/dev/null |while read filename; do cp $filename /root/com/$filename`date +%Y%m%d_%H%M%S` ; done
12,555
Posted By tukuyomi
Another way:~/unix.com$...
Another way:~/unix.com$ d='/root/logs/testing/today/'; echo ${d%/*/}
/root/logs/testing
7,328
Posted By jim mcnamara
A date format string works just like the printf...
A date format string works just like the printf (either C or shell printf) format string.


date '+%Y-%m-%dT%T.%N'

Gives you the result you want, the way you did it was correct, but confusing...
2,515
Posted By PikK45
Got the quotes wrong again :( echo...
Got the quotes wrong again :(

echo "\"$(date '+%Y'-'%m'-'%d'T'%T'.'%N')\""
2,515
Posted By zaxxon
Use single quotes: echo '<xml...
Use single quotes:

echo '<xml version="1.0">' >> /root/xml/sample.xml
3,351
Posted By max_hammer
try this ls -ltr...
try this


ls -ltr /root/admin/files/file* | head -1 | awk -F "/" '{print $NF}'


here i have set the field seprator as "/" awk -F "/" and $NF means last field
2,758
Posted By Corona688
( echo "<master>"; cat child1.xml child2.xml ;...
( echo "<master>"; cat child1.xml child2.xml ; echo "</master>" ) > master.xml
8,391
Posted By ygemici
try ........ ./test1.sh && ./test2.sh
try
........
./test1.sh && ./test2.sh
4,177
Posted By ygemici
you can try this ;) # sed -n...
you can try this ;)
# sed -n '/^<url>/s/<[^>]*>//gp' file*.html >>text.txt
# cat text.txt
http://www.google.com
http://www.yahoo.com


regards
ygemici

---------- Post updated at 11:37 AM...
9,280
Posted By frappa
hi, try: find /path/to/dir -type f...
hi,

try:

find /path/to/dir -type f -empty -mmin -60 -print >> /path/to/list.txt
9,981
Posted By Rksiva
If loc2 is same server then use cp, else if its...
If loc2 is same server then use cp, else if its different server then use scp command


cp ${loc1}/file1.txt ${loc2}/test.txt

(or)

scp hostname:${loc1}/file1.txt hostname:${loc2}/test.txt
3,909
Posted By zaxxon
A combination of a while/read loop that takes the...
A combination of a while/read loop that takes the list as input, maybe testing with wget inside and checking it's return code on success or fail.
15,724
Posted By jayan_jay
Use -i option .. $ sed -i '/^$/d' infile
Use -i option ..

$ sed -i '/^$/d' infile
286,166
Posted By jayan_jay
@vel4ever , -f will check for the file...
@vel4ever , -f will check for the file existence but -s will check for file existence along with file size greater than 0 (zero)..

If you are checking for the existence of a file which is...
9,875
Posted By ahamed101
file_size=$( stat -c %s /your/file ) if [...
file_size=$( stat -c %s /your/file )
if [ $file_size -gt 10000 ]
then
rm /your/file
fi
--ahamed
25,462
Posted By ctsgnb
Yes : echo "temporary string" >>...
Yes :

echo "temporary string" >> newly_created_filefor i in origfile.*
do
echo "temporary string" >> $i
done
34,496
Posted By birei
Bad answer. Omit this post. EDIT: Did you...
Bad answer. Omit this post.

EDIT:
Did you thank it? Then I will re-write my original post, but it wasn't what you are looking for, it outputs a decimal number, without ceiling.

$ echo...
63,698
Posted By balajesuri
$ x="ABCDEF,BBCCDD" $ for y in `echo $x | sed...
$ x="ABCDEF,BBCCDD"
$ for y in `echo $x | sed 's/,/ /g'`; do echo -e "$y\c" | sed 's/\(..\)../\1QW/'; echo -e ",\c"; done | sed 's/,$//'
2,270
Posted By balajesuri
#! /bin/bash echo "<path>" >> file.xml for x...
#! /bin/bash
echo "<path>" >> file.xml
for x in `ls test*`
do
echo -e "\t<dir>" >> file.xml
echo -e "\t\t<file>location/$x</file>" >> file.xml
echo -e "\t\t<date>`date`</date>" >>...
Showing results 1 to 25 of 37

 
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy