Search Results

Search: Posts Made By: lukefrost96
10,629
Posted By lukefrost96
I honestly thought that the code I had written...
I honestly thought that the code I had written was right, just needed tweaking to get rid of the error.

I'm assuming you pass the files in the directory to tail or head by using the -n option to...
10,629
Posted By lukefrost96
I have tried the command and it came up with...
I have tried the command and it came up with this:
-bash: syntax error near unexpected token `newline'

$2 is a numeric value

Also the OS is Windows.
10,629
Posted By lukefrost96
Right I understand what the special variables do....
Right I understand what the special variables do.

I now get what you were talking about with $2, I only just realised I haven't actually used it.

However I still don't understand why it is not...
10,629
Posted By lukefrost96
I get this -bash: syntax error near unexpected...
I get this
-bash: syntax error near unexpected token `newline'


I am new to unix as I said so I am guessing the arguments need to be in order
e.g.
$#
$1
$2
etc
10,629
Posted By lukefrost96
All the directories I try have files in them. ...
All the directories I try have files in them.

I'm not sure what to do for binaries as I am fairly new to unix.
10,629
Posted By lukefrost96
We haven't been told about what would happen if...
We haven't been told about what would happen if it was empty or contained binaries.

This is one of the commands I have been set so it must work surely.
10,629
Posted By lukefrost96
I just put the $2 command there so that if a...
I just put the $2 command there so that if a negative integer was entered, then it would prompt the user to enter a positive one.
10,629
Posted By lukefrost96
I type in lshead -head 2 Documents (or whatever...
I type in lshead -head 2 Documents (or whatever directory I want)

$0 = lshead command
$1 = -head/-tail
$2 = numeric value
$3 = directory
10,629
Posted By lukefrost96
UNIX head command not working?
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

Write a...
1,559
Posted By lukefrost96
This is as part of an assignment. And the...
This is as part of an assignment.

And the operating system we are using is Windows
1,559
Posted By lukefrost96
Need help with bash shell script
I need to create digit day script that takes a single numeric argument and then it should print out the day of the week using the number modulo 7 formula e.g: 0 - Sunday 6- Saturday 131 - Friday

I...
Showing results 1 to 11 of 11

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