Sponsored Content
Full Discussion: file deleting question
Top Forums UNIX for Dummies Questions & Answers file deleting question Post 302125518 by LisaS on Thursday 5th of July 2007 05:57:07 PM
Old 07-05-2007
thanks - dot slash worked fine.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting lines inside a file without opening the file

Hi, Just consider there are around 10 lines in a file. Now is it possible to delete the first 2 lines in the file without opening the file. No matter whatever the content of the file is, I just wanna delete the first 2 lines without opening the file. Is that possible? If so, please help me out.... (3 Replies)
Discussion started by: toms
3 Replies

2. Shell Programming and Scripting

Deleting the Last value from a file

How do i use SED command to replace the last existance of ',' with a blank value OR CUT can also do?? Eg --> aaa,aaad,fsdfde, I want to replace it with aaa,aaad,fsdfde Thanks in Advance (7 Replies)
Discussion started by: theeights
7 Replies

3. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

4. Shell Programming and Scripting

Deleting file name

I need a way to remove all the file names with they are extension from a line of a document. For example: I have doc named "gara" with the following content: /media/gogo/6651-FEAB/Desktop/Desktop.jpg /media/gogo/6651-FEAB/Desktop.pdf /media/gogo/6651-FEAB/linux/logo1.jpg... (4 Replies)
Discussion started by: gogok_bg
4 Replies

5. UNIX for Dummies Questions & Answers

Deleting a pattern in UNIX without deleting the entire line

Hi I have a file: r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e) I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies

6. UNIX for Dummies Questions & Answers

Crontab deleting files command question

Hello out there, Our system has a pdf generator that creates pdf files. We dont need them pas 120 days. So I have this command in my crontab. I currently set it to "0" for testing. But normally have it set to -mtime 120 to remove files out of the folders from PDF out to several other potential... (7 Replies)
Discussion started by: vsekvsek
7 Replies

7. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies

8. UNIX for Dummies Questions & Answers

Deleting file basing on the timestamp substring in the file name

Hello, I have in my backup folder, files with names convention like this : randomFileNames_13-02-2014_23h13m09+1392333189 randomFileNames_14-02-2014_02h13m09+1392343989 randomFileNames_14-02-2014_04h13m09+1392351189 etc.... Base on timestamp at end of the filename, I would to delete all the... (7 Replies)
Discussion started by: thuyetti
7 Replies
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)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy