Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Editing multiple files with vi, why :p is not working Post 302802233 by newbie_01 on Friday 3rd of May 2013 06:42:48 AM
Old 05-03-2013
Editing multiple files with vi, why :p is not working

Hi,

Can any gurus advise why :p is not working on my vi?

When editing multiple files, :n works and it takes me the next file, but :p which is supposed to take me back to the previous file does not work.

Please advise. Thanks in advance.

Last edited by newbie_01; 05-03-2013 at 07:46 AM.. Reason: :p is translating to smileys
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Editing one string in multiple files

I am trying to edit multiple files from one directory and including all the files in all the sub directories. My string opens each file, puts the text on my screen and does not save the new information to the file. I am using a variable in my script, and wondering if that is what is choking it. ... (1 Reply)
Discussion started by: Skoshi
1 Replies

2. UNIX for Dummies Questions & Answers

editing sqlplus id@passwd in multiple scripts, users and directories

hi all, i was given by my supervisor a task to search for scripts which contain oracle sqlplus i.e "myusername/mypasswd @myDB" in every /home/userfolder, which are, all the scripts made by different user. I've done some find command to search string for sqlplus, but it may up too long to respond.... (8 Replies)
Discussion started by: Helmi
8 Replies

3. UNIX for Dummies Questions & Answers

Editing multiple file names in one go

Hi there, I have a folder full of pdf's and I've run a compression on the to reduce the size, the output of the compress places a '-o' in the name of the file. Before 12345.pdf After 12345-o.pdf Now I've got around 50000 files that I need to change back to the previous name, is... (3 Replies)
Discussion started by: KeesH
3 Replies

4. Shell Programming and Scripting

for loop, calling and editing multiple files inside

hey guys, I'm trying to call and modify multiple files inside the for loop, i can't get it to work... ------------------------ AFILE=/dir/a_file.txt BFILE=/dir/b_file.txt CFILE=/dir/c_file.txt ADESTFILE=/dir/a_dest_file.txt BDESTFILE=/dir/b_dest_file.txt... (6 Replies)
Discussion started by: DeuceLee
6 Replies

5. Shell Programming and Scripting

uuencode not working for multiple files

Hi, I have gone through the other related post but are of no help for me I am sending multiple files as attachement. The first file comes fine as an attachement but the other files are coming as binary. For people with older version of email software they can see all attachements but... (1 Reply)
Discussion started by: pinnacle
1 Replies

6. Shell Programming and Scripting

How to make an editing script work for multiple files?

Hey everybody, I have a script for making a string substitution in a file. I am trying to modify it in order to make the same modifcation to multiples files. here is what I have so far. #!/bin/csh set p1="$1" shift set p2="$1" shift foreach x ($*) if ( { grep -w -c "$p1" $x } ) then mv... (7 Replies)
Discussion started by: iwatk003
7 Replies

7. Shell Programming and Scripting

editing names of files in multiple folder

I have 1000's of directories which is named as numbers. Each directory contains multiple files. Each of these directories have a file named "att". I need to rename all the att files by adding the directory name followed by "_" then att for each of the directories. Directories 120 att... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

8. Shell Programming and Scripting

Problem while working with multiple files

Dear friends, I am working with two files named g1.txt and g2.txt....g1.txt is my main file in which it contains following data #per_no permissionname permission command 1|HideCDrive, | : REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v... (1 Reply)
Discussion started by: jalpasoni
1 Replies

9. Shell Programming and Scripting

Editing phone number with multiple delimiters

Hello all I have a data base of information that is formatted like so: JSD4863 XXX-XX-XXXX DOE, JOHN C JR-II BISS CPSC BS INFO TECH 412/779-9445 I need the last four digits of the phone number. However, many lines contain 'garbage data' that I'm not interested in. So i used a 'for loop'... (7 Replies)
Discussion started by: smartSometimes
7 Replies

10. 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
madvise(2)							System Calls Manual							madvise(2)

NAME
madvise() - advise the system of a process's expected paging behavior SYNOPSIS
DESCRIPTION
The system call permits a process to advise the system about its expected future behavior in referencing a mapped file, an anonymous memory region, or a shared memory region. Certain implementations can use this information to optimize the use of resources. addr and len specify the address and length in bytes of the region to which the advice refers. For the address and length must be con- tained within a successful call to (see mmap(2)) or a successful call to (see shmat(2)); otherwise, fails with an [EINVAL] error. The behav argument is one the following flags defined in the header Removes any previous advice and sets the default behavior. By default, the kernel tracks access patterns on data objects and per- forms I/Os based on process trends (that is, sequential versus random). Sequential trends cause larger "read-ahead" I/Os, while random accesses reduce the amount of I/O to avoid unnecessary I/O. Informs the kernel that any objects mapped in this range will be accessed in a random matter. The kernel will read only the minimal amount of data to satisfy the user fault. Informs the kernel that any objects mapped in this range will be accessed in a sequential matter. The kernel will perform the maximum read-ahead for every fault. The kernel does not pay attention to access patterns and trends, but instead assumes sequentiality for every access on the object. Informs the kernel that the specified range is no longer needed by the process. This allows the kernel to release the physical pages associated with an address range back to the system for use by other processes. is restricted to object ranges created with calls to and Attempting to use on an object that was not created using a call to or will result in [EINVAL] being returned to the caller. Will need these pages. Ensure that resources are reserved. WARNINGS
The current implementation of defines and as null operations. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
If fails, is set to one of the following values. [EFAULT] The range specified by (addr, addr+len) is invalid for a process's address space, or permission was incorrect on the object for the behav specified. [EINVAL] behav contains an invalid value, or addr is not a multiple of the page size as returned by the system call [EINVAL] The address range specified by addr and len was not created by a successful call to or AUTHOR
was developed by HP and OSF. SEE ALSO
mmap(2), sysconf(2). STANDARDS CONFORMANCE
madvise(2)
All times are GMT -4. The time now is 11:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy