07-02-2013
Update
So does that mean I have to input the d=`date '+%Y'` into emacs? Also once it's in emacs am I supposed to be putting parentheses around the commands to make them work?
Also here is a link to the assignment, this was left off of the original post.
www dot cs dot fsu dot edu slash ~langley slash COP3353 slash 2013-2 slash Assignment02 dot html
(Had to add "dot" "slash" since I'm too noob to post urls, sorry)
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have had a problem in Linux with the "Fortune" messages (unfortunately! :( ) and I need to trap the message again. It starts with a "IMPORTANT NOTICE".
To capture this, I write a script as follows..
#!/bin/sh
a=0
while ; do
/usr/games/fortune >> fortune.txt
a=`expr $a + 1`
done... (4 Replies)
Discussion started by: oldtrash
4 Replies
2. Shell Programming and Scripting
Hello,
I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work.
I know there is a special unix command call "script" which records screen session but the... (4 Replies)
Discussion started by: lalfonso.gomez
4 Replies
3. Shell Programming and Scripting
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies
4. AIX
Hi,
This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies
5. Virtualization and Cloud Computing
Hello,
I'm trying to create a VirtualBox "harddisk" and put an dd-image into it. This image shoudn't work as a virtual maschine, I just want to be able to mount it to an folder. How can I do this with an shell script?
Sebi
---------- Post updated at 10:36 AM ---------- Previous update... (0 Replies)
Discussion started by: Sebi0815
0 Replies
6. Shell Programming and Scripting
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies
7. Shell Programming and Scripting
How do I create shortcuts? For example:
I just want to type one key "l" and have it output the command of "ls -lah"
I believe it's creating a file called l with 755 permissions but I'm not sure where to put the file.
*if it matters, I'm on a shared hosting web server using cPanel with... (2 Replies)
Discussion started by: ijustsawmars
2 Replies
8. Shell Programming and Scripting
Which one of the following are more accurate and why?
nohup myScript.sh 1>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh 1>>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh >nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh >>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &... (3 Replies)
Discussion started by: kchinnam
3 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT SUSE
git-check-ref-format
GIT-CHECK-REF-FOR(1) Git Manual GIT-CHECK-REF-FOR(1)
NAME
git-check-ref-format - Ensures that a reference name is well formed
SYNOPSIS
git check-ref-format <refname>
git check-ref-format --print <refname>
git check-ref-format --branch <branchname-shorthand>
DESCRIPTION
Checks if a given refname is acceptable, and exits with a non-zero status if it is not.
A reference is used in git to specify branches and tags. A branch head is stored under the $GIT_DIR/refs/heads directory, and a tag is
stored under the $GIT_DIR/refs/tags directory (or, if refs are packed by git gc, as entries in the $GIT_DIR/packed-refs file). git imposes
the following rules on how references are named:
1. They can include slash / for hierarchical (directory) grouping, but no slash-separated component can begin with a dot ..
2. They must contain at least one /. This enforces the presence of a category like heads/, tags/ etc. but the actual names are not
restricted.
3. They cannot have two consecutive dots .. anywhere.
4. They cannot have ASCII control characters (i.e. bytes whose values are lower than 40, or 177 DEL), space, tilde ~, caret {caret},
colon :, question-mark ?, asterisk *, or open bracket [ anywhere.
5. They cannot end with a slash / nor a dot ..
6. They cannot end with the sequence .lock.
7. They cannot contain a sequence @{.
8. They cannot contain a .
These rules make it easy for shell script based tools to parse reference names, pathname expansion by the shell when a reference name is
used unquoted (by mistake), and also avoids ambiguities in certain reference name expressions (see git-rev-parse(1)):
1. A double-dot .. is often used as in ref1..ref2, and in some contexts this notation means {caret}ref1 ref2 (i.e. not in ref1 and in
ref2).
2. A tilde ~ and caret {caret} are used to introduce the postfix nth parent and peel onion operation.
3. A colon : is used as in srcref:dstref to mean "use srcref's value and store it in dstref" in fetch and push operations. It may also be
used to select a specific object such as with git cat-file: "git cat-file blob v1.3.3:refs.c".
4. at-open-brace @{ is used as a notation to access a reflog entry.
With the --print option, if refname is acceptable, it prints the canonicalized name of a hypothetical reference with that name. That is, it
prints refname with any extra / characters removed.
With the --branch option, it expands the `previous branch syntax'' `@{-n}. For example, @{-1} is a way to refer the last branch you were
on. This option should be used by porcelains to accept this syntax anywhere a branch name is expected, so they can act as if you typed the
branch name.
EXAMPLES
o Print the name of the previous branch:
.ft C
$ git check-ref-format --branch @{-1}
.ft
o Determine the reference name to use for a new branch:
.ft C
$ ref=$(git check-ref-format --print "refs/heads/$newbranch") ||
die "we do not like '$newbranch' as a branch name."
.ft
GIT
Part of the git(1) suite
Git 1.7.1 07/05/2010 GIT-CHECK-REF-FOR(1)