Search Results

Search: Posts Made By: 14th
Forum: Programming 10-16-2012
4,662
Posted By 14th
[ask]SQL command act like sort and grep
for example, I have a text file in random content inside, maybe something like this.
234234
54654
123134
467456
24234234
7867867
23424
568567if I run this command
cat "filename.txt" | sort...
1,092
Posted By 14th
as far as I know sftp only for file management. ...
as far as I know sftp only for file management.

why don't you use ssh?
ssh user@192.168.56.10
user@server> test.sh ---execute for remote server not for local server.

btw, you should give...
5,384
Posted By 14th
maybe this can help. first, try to find all...
maybe this can help.
first, try to find all files except *.log files with this command.
find . -type f \( ! -iname "*.log" \)if you see that list of files are correct to be deleted.
you can add...
1,924
Posted By 14th
I don't know what you really want to do, but I...
I don't know what you really want to do, but I used to use curl to GET dan POST data from or to an url.
4,592
Posted By 14th
will it be same with `create a backup script on...
will it be same with `create a backup script on remote computer > run ssh from local computer to remote computer > run backup script on remote computer`?
1,561
Posted By 14th
is this command work? ls -lt | awk '{ print $9...
is this command work?
ls -lt | awk '{ print $9 }' | cut -d "." -f1 | sed 's/[0-9]*$//g' | sort -u | while read line
do
ls "${line}"* | sort -r | tail -n +2
#~ ls "${line}"* | sort -r | tail...
5,308
Posted By 14th
I think, that's because of the typo. echo...
I think, that's because of the typo.

echo "column name 2 lower: $coulmn_name2

it should be.

echo "column name 2 lower: $column_name2
5,308
Posted By 14th
why don't use sed or tr? column_name="vivek"...
why don't use sed or tr?

column_name="vivek"
column_name2="ViVeK"
column_name=$(echo $column_name | tr '[:upper:]' '[:lower:]')
column_name2=$(echo $column_name2 | tr '[:upper:]' '[:lower:]')...
2,417
Posted By 14th
[ask] about unset variables
I'm wondering, is the number of variables will affect execution time of my bash script or maybe affect the cpu workload, cpu memory, etc ?

If I create so many variables, should I unset each one of...
2,754
Posted By 14th
How to create executable file just like in folder /bin?
I know shell is an interpreter language, but can I make an executable file just like in folder /bin, /usr/bin, etc which source code was from a .sh file or from some .sh files??
My main purpose is...
2,056
Posted By 14th
sorry, but I'm new to bash. I already read the...
sorry, but I'm new to bash. I already read the manual, but I don't know how to use it..:confused:

How can I assign string to date?

I tried this command, but doesn't work..
start=$(date --utc...
2,056
Posted By 14th
[ask]date variable
Is there date variable in bash?

for example, I have string 01-23-2010 (mm-dd-yyyy) or 23-01-2010 (dd-mm-yyyy).
How can I convert that string to date variable?

and how to do some math operation...
28,581
Posted By 14th
thanks for the answering, but I don't really know...
thanks for the answering, but I don't really know what is hpricot and how to use it.
I'm new to shell programming and I don't know ruby at all.:(

do you know any solution using sed, awk, or grep...
28,581
Posted By 14th
How to extract url from html page?
for example, I have an html file, contain
<a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example
<a href="http://awebsite" ...
24,939
Posted By 14th
yes, the file's size is small. It's only...
yes, the file's size is small.
It's only contain less then 10 lines, and only have a few words each line.
thanks
24,939
Posted By 14th
I don't know it will be as simple as that,...
I don't know it will be as simple as that, because I'm new to bash and I only know cat.
Thanks.:)
24,939
Posted By 14th
How to put content of file into a variable?
For example, I have a simple text file
note:
this a note
a simple note
a very very simple notewhen I use this command,
temp=$(cat "note.txt")then I echo temp, the result is in one line.
echo...
11,110
Posted By 14th
thanks for answering.. when I run your command,...
thanks for answering..
when I run your command, I got different result..
echo "<tag1>content</tag1>" | sed -e 's/<\([^>]*\)>/\1/g'
tag1content/tag1and when I run this command, I got this..
echo...
11,110
Posted By 14th
[ask]how does sed -e 's/<[^>]*>//g' works?
I found this command, sed -e 's/<[^>]*>//g', will return the content of a line with pattern something like this, <tag1>content</tag1>..

How does this works?
What does sed -e 's/<[^>]*>//g'...
1,174
Posted By 14th
[ask]same but not same (variable and line of file)
hi all.
I'm new to bash programming.

I have a problem with compare bash variable and string from text.

for example.
# I wanted to get maximum page (in this case 16)

cat "page.html" | while...
Showing results 1 to 20 of 20

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