Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: subway69
1,442
Posted By subway69
I'm just learning syntax differences. Thank you...
I'm just learning syntax differences. Thank you for your reply I appreciate it!
1,442
Posted By subway69
Difference between these cron commands
Hi all I want to make sure I was understanding this correctly

if a cron job command was

* */20 * * * command

does that mean this command will run every 20 hours?

also what is the...
4,431
Posted By subway69
sure thing it is a for loop #!/bin/bash ...
sure thing it is a for loop


#!/bin/bash

for img in *.jpg
do
if [ $# -gt 0 ]
then
jpegtopnm "$img" | pnmscale -height 200 | pnmtojpeg > "${img%.jpg}-thumb.jpg"
...
4,431
Posted By subway69
display echo only once
lets say I am printing something out


echo "Please enter a valid username"


and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but...
970
Posted By subway69
Hi thanks for the reply this is what I am...
Hi thanks for the reply

this is what I am getting back right now im not entirely sure but it seems to be an improvement
970
Posted By subway69
accepting images as a list and changing the name
Here is what I have so far


#!/bin/bash

while [ $# -gt 0 ]
do
read image
jpegtopnm $image | pnmscale -height 200 | pnmtojpeg > $image-thumb
echo $image-thumb
...
1,014
Posted By subway69
What I did is use an until loop and it worked so...
What I did is use an until loop and it worked so far but after adding in the prompt to return an error


#!/bin/sh
echo Please enter a car model:
read model

echo $model | grep /home/cars >...
1,014
Posted By subway69
this worked perfectly thanks a lot! And do...
this worked perfectly thanks a lot!

And do you know how I can re-prompt for input if there is no match? Basically restart the entire process.

---------- Post updated at 10:59 AM ----------...
1,014
Posted By subway69
a little help with using AWK to display whats being read in
I am making a script that reads in the model of a car and then searches a file and displays the make model and price of anything matching the input provided. here is what I have so far


#!/bin/sh...
27,002
Posted By subway69
thanks for the reply I am using bash shell ...
thanks for the reply I am using bash shell

as for posting data, how can I use 'curl -d' to post the short URL? Is it going to automatically return the short URL on its own or is there a specific...
27,002
Posted By subway69
Using CURL in a script
Hi all

so I'm new to scripting but I am making a script that is a url shortener. It will take a url off the command line and spit back the shortened version using bit.ly's api

this is what I...
1,115
Posted By subway69
Script that displays contents of a directory
Hello all! I am writing a script that takes in a directory name as input and if the directory exists, it shows the files inside the directory

here is what I have so far (incomplete) (mostly like...
672
Posted By subway69
if else help in a script
I have a script that displays whether a user is online or not and if they are it displays how long and if not it displays the last time they were logged on.

Now I am trying to make it so if a user...
1,766
Posted By subway69
thank you im writing a script that displays...
thank you

im writing a script that displays the last time the user has been on and a quick question here

Currently it displays the last time the user has been on but multiple times, will using...
1,766
Posted By subway69
is there a command to see when the last time a user has been online if they arent?
When I use who it shows who is online and from what time they logged in but is there a way I can see the last time someone was logged on if they aren't online? Is it with the who command?
thx
2,107
Posted By subway69
gah I should have known to pipe grep I completely...
gah I should have known to pipe grep I completely forgot

still learning. . .

thanks guys:)
2,107
Posted By subway69
1,452
Posted By subway69
Read input while executing the command
Hi everyone, i have made a very simple script where it reads the user input and converts the number from celcius to faranheit but instead of running the command and prompting the user for input I...
Showing results 1 to 18 of 18

 

Featured Tech Videos

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