Sponsored Content
Full Discussion: Vi % commands
Top Forums UNIX for Dummies Questions & Answers Vi % commands Post 302769590 by MaindotC on Tuesday 12th of February 2013 05:50:14 PM
Old 02-12-2013
Thanks - I see the colon commands now. I've been handed a .csv which contains information on each line that would be extremely useful for grepping. Unfortunately, some cells contain carriage returns or newlines. I have been able to join lines that really should be together via this sed quickie:
Code:
:%s/$\n$//g

which removes newlines followed by a blank line and basically joins the lines. However, there are some lines that follow the $\n that are characters. I still need these joined.

After examining this I don't see a way that sed can differentiate between fragmented lines versus non-fragmented lines, and hence I could possibly join all 6K lines in the file inadvertently. Oh well.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

commands

hi, I'm completely new to FreeBds or unix in general, is there a really nice site to teach you the basic ommands to free BSD. I don't know what to do. =( (3 Replies)
Discussion started by: Special K
3 Replies

2. Shell Programming and Scripting

commands

anyone know the command to display the ten most common words, together with their number of occurences, in the manual entry for the ls command. It would be much useful (1 Reply)
Discussion started by: master_6ez
1 Replies

3. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

4. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

5. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

6. UNIX for Dummies Questions & Answers

help with some commands

Hi! i'd like from someone to explain me 'what is what' from these parts of code if it's possible.i'd like to understand them and their usage: 1) sed '3d' filename 2) sort –t: +0 -1 /etc/passwd and also this: tr ‘’ ‘ ‘ < filename thank you! (11 Replies)
Discussion started by: strawhatluffy
11 Replies

7. UNIX for Advanced & Expert Users

All my Commands GONE =( !!

Hi all, Im a newbie in Centos 5.8 What had i typed was "export PATH=/sbin/service" and now my command like ls, touch, mv, useradd, mysqldump, and more have gone.. anyone know how to solve it? (1 Reply)
Discussion started by: yjk2121
1 Replies

8. UNIX for Dummies Questions & Answers

Need help with certain commands

I'm trying to figure out certain commands for these steps. If you wish to discuss with me in real time, PM me your AIM or MSN, thanks. Here are the steps. Edit the readcal_final file Delete all of the lines that comprise the colandar portion of the memo Without leaving vi, open a new... (0 Replies)
Discussion started by: vgmaster9
0 Replies

9. Shell Programming and Scripting

Ls commands

So I need a way to list all files that contain 4 letters. Also separately I need to find a way to list all files with l or n as the third letter of the name. I need to use the ls command and/or grep/egrep. Any help would be a appreciated. (2 Replies)
Discussion started by: muttfacejohnson
2 Replies

10. Homework & Coursework Questions

What are the commands for this ?

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: If the user enters option 1, your program should display the list of entries in the current directory. For... (1 Reply)
Discussion started by: UniverseCloud
1 Replies
aptsh(1)						      General Commands Manual							  aptsh(1)

NAME
Aptsh - interactive APT shell SYNOPSIS
aptsh {install pkg | remove pkg | update | ... } [-?, --help] [-c, --config-file configuration_file ] [-s, --storing] [-v, --version] [-x, --execute aptsh_command ] DESCRIPTION
Aptsh is a tool which makes using APT much easier. It gives you an interactive shell with all those sweet features like tab-completion (which you can use to complete name of a package), simpler access to apt commands and easier package searching (ls, rls). Although it's not necessary, it just tries to make life easier. Other way of using Aptsh is using it as a normal command-line tool, a replacement for apt-* commands. USAGE
We'll try to do some ordinary administration tasks - install/remove/search few packages. As a root, type 'aptsh' and press return. Then type 'ins', and press Tab - 'ins' should change into 'install' followed by a whitespace. Now write down 'kde', and press Tab twice - if you're using Debian or other large distro, it should ask you whether you want to see all packages which begin with 'kde'. As you should have noticed - it works exactly like a good shell. You can also play with 'remove' - then aptsh will prompt only installed packages. And remember, that you can pipe results of commands (ie. dump | grep ^Package | cut -d -f 2 | grep ^kde ). You can execute a normal shell command by preceding it with ".". COMMANDS
Aptsh commands: dump-cfg Dump all aptsh options. dpkg Query dpkg. ls Search for packages by matching names to a wildcard. Remember that in some enviroments you have to put the expression between " " or preced special chars with . rls Search for packages by matching names to a regular expression. Read note about special chars above! whatis Display a short description of a package. whichpkg Find the package that supplies the given command or file. listfiles List all files owned by a package. news Obtain the latest news about the package from Debian servers changelog Retrieve latest changelog for the package from Debian servers toupgrade List packages with newer versions available for upgrading ` Change mode. queue-commit Commit stored commands. User answers to all prompts. queue-commit-say Commit commands kept in command queue, automatically answering to all prompts. It should be followed by the answer, if not, it answers (then usually program's behaviour is default). Proper usage of commit-say would be "commit-say y" - then Aptsh answers 'y' to all prompts. queue Display currently stored commands. queue-remove Remove stored commands from list. It should be followed by list or section of numbers of items to remove. Proper usage of this command would be: "commit-remove 1 3 10-15 21" - it will remove items numbered as 1, 3, 10, 11, 12, 13, 14, 15, 21. You can use alias 'last' which refers to the last item. queue-clear Clear list of stored commands orphans Find orphaned libraries on your system. orphans-all Find all orphaned packages on your system, not only libraries. It's output is other than the orphans' one - it's splitted into two columns, first one contains packages' Section, second Name. help Executes 'man aptsh', or displays short info about commands (if any were given as arguments). help-howto Displays HOWTO. You can pipe it to a browser ("more" or "less") or grep it. quit Erm... quit? :) apt-get querying commands (see man apt-get): install update upgrade dselect-upgrade dist-upgrade remove purge (same as remove --purge ) source build-dep check clean autoclean apt-cache querying commands (see man apt-cache): show dump add showpkg stats showsrc dumpavail unmet search depends rdepends pkgnames dotty policy madison AUTHOR
Marcin Wrochniak (wrochniak@gmail.com) version 0.0.6 20 Mar 2005 aptsh(1)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy