I need to open everyone's favorite editor, vi of course, with a command that will place me on a search string at the time of invocation:
Given this data file:
I want to open vi, with the cursor positioned on the first occurrence of "132" (last number in the second line).
Having a look at the man vipage in the invocation options section:
I launch vi like this: $ vi +/132 filename.dat, expecting to end up positioned on the "1" of the first "132". Instead, I end up at the very first column of the row that contains the pattern. So, it seems that the "specified editor command" is not necessarily the same command as you would expect after vi has opened the file (where typing /132 indeed places me on the "132".
Putting double or single quotes around the "132" does not make a difference.
Any ideas? Is there a list of what commands are available when starting vi like this? I cannot seem to find a list.
You can given any ex utility editing command to vi as the option argument to the -c option. Unfortunately, ex doesn't have a concept of a cursor position within a line, so you can't set the cursor to appear on the matched text unless it appears at the start of the line.
Hi ,
what does this below commands do in perl ?
open(fd, ">>$received_notification_file");
print fd "$feed_name,,,$feed_expected_ind,$received_ind,$copied_ind,$market_pricing_dt\n";
close(fd);
also this
$tmp_file_Ctrl = "$Program.tempfileC_$feed_name" ;
... (1 Reply)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Hi,
I have a menu script written in PERL which calls some shell scripts and displays the return.
I'm having a problem with OPEN. A section of the code is below:
`./scriptlist.ksh 1`;
open OUTPUT, "</home/$SCRIPTUSER/output";
{
local $/ = undef;
$_ =... (2 Replies)
We have lots of error with "Too many open files" issue. So when I increase the limit to 36656 as suggested by this forum, and when i log out from the platform, it always went back to origin value, what has went wrong ? please any suggestion ?
root@hsbc_milan> ulimit -a
core file size ... (1 Reply)
Dear all,
I had a columned based file after processed from my script. In unix platform, my file is ok, with all columns sorted out nicely. But when i open in windows notepad, the columns are running out of order. Can some one help??
Thanks alot in advance (4 Replies)
Hi folks. This has been bothering me for a while.
Among the 8 virtual desktops I'm using, I have 18 terminals open right now.
I change some of my user configuration (e.g. put a new alias into ~/.bashrc); but in order to use this new added alias, I have to source the config file:
.... (4 Replies)
Hi Unix team,
Is there any alternative option and command which one can use in ftp for sftp usage.
open, system command --> alternative for sftp usage
-n option --> alternative for sftp usage
sftp supports only binary transmission.
how one can achieve ascii mode file... (8 Replies)
Hello!
One command generates a file path, which I then want to open in finder. The slow way is this with C&P:
$bundle show jquery-validator
/Users/peter/.rvm/gems/ruby-1.9.2-p136/gems/jquery-validator-0.3.0
$open /Users/peter/.rvm/gems/ruby-1.9.2-p136/gems/jquery-validator-0.3.0
I... (4 Replies)
Hi All !
We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows.
I have used the utility ZIP like the below.
zip -e <newfilename> df2_test_extract.dat
but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Hi,
I want to ftp from my virtual box to my desktop which is a windows machine. I have installed open solaris on my virtual box. though that is in network i am unable to ftp to my windows and vice versa.
Please help (3 Replies)